[U-Boot] [PATCH] fix get_ram_size memory corruption

Wolfgang Denk wd at denx.de
Tue Oct 21 11:27:55 CEST 2014


Dear Gerd,

In message <1413874945-16560-1-git-send-email-kraxel at redhat.com> you wrote:
> base[0] is saved, but never restored.

Patches for this have been submitted before, but were rejected.  You
may want to dig the archives for these.

What exactly is your test case where you see any memory corruption?


> -	if ((val = *addr) != 0) {
> +	val = *addr;
> +	*addr = save[i];
> +	if ((val = 0) != 0) {
--------^^^^^^^^^^^^^^^^^^^^^^

This code looks pretty much wrong to me; the condition "0 != 0" can
never become true...

NAK.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Presidency:  The greased pig in the field game of American politics.
- Ambrose Bierce


More information about the U-Boot mailing list