[U-Boot] [PATCH] cmd_nand: fix crashing bug in nand read/write
Scott Wood
scottwood at freescale.com
Thu Jun 7 19:27:40 CEST 2012
On 06/07/2012 12:19 PM, Steve Sakoman wrote:
> Commit 418396e212b59bf907dbccad997ff50f7eb61b16 introduced a
> bug that causes nand read and nand write to crash in strcmp
> due to a null pointer.
>
> Root cause is that strchr(cmd, '.') returns a null pointer when
> the input string does not contain a '.'
>
> The strcmp function does not check for null pointers, resulting
> in a crash.
>
> Signed-off-by: Steve Sakoman <steve at sakoman.com>
Applied to u-boot-nand-flash, thanks!
This was missed in testing because U-Boot on PowerPC unfortunately has a
valid mapping at NULL.
-Scott
More information about the U-Boot
mailing list