]> git.dujemihanovic.xyz Git - u-boot.git/commit
flash_protect: check for NULL flash info
authorMike Frysinger <vapier@gentoo.org>
Thu, 29 Jul 2010 03:45:03 +0000 (23:45 -0400)
committerWolfgang Denk <wd@denx.de>
Sun, 8 Aug 2010 23:03:54 +0000 (01:03 +0200)
commita4e8d9f5f957c7e3972ca9d25f17de5f8acd8244
tree2f01e36b14fe7688b95f64b0e5f7ad14c61bace4
parent9ed4a9582ff61225d46241a1c99795549722503c
flash_protect: check for NULL flash info

If a flash is unable to be detected, and then someone calls flash_protect
on it (like the common code does in flash_init), the flash_protect logic
will dereference a NULL pointer.

Since flash_protect already does sanity checking on the info structs, add
a NULL pointer check in there.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
common/flash.c