mtest: remove braindamaged NULL pointer deref
The alternative memory test implementation needs a scratch memory location to remove the last data from the data bus. Instead of using a NULL pointer for this, default to the memory start address. No sane program should consider a NULL pointer as a safe default. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
1a3c1d3de1
commit
a7acf2e746
|
@ -51,7 +51,7 @@ static int mem_test(ulong _start, ulong _end, ulong pattern_unused)
|
|||
#ifdef CFG_MEMTEST_SCRATCH
|
||||
vu_long *dummy = (vu_long*)CFG_MEMTEST_SCRATCH;
|
||||
#else
|
||||
vu_long *dummy = 0; /* yes, this is address 0x0, not NULL */
|
||||
vu_long *dummy = start;
|
||||
#endif
|
||||
int j;
|
||||
int iterations = 1;
|
||||
|
|
Loading…
Reference in New Issue