Re: [U-Boot] [RFC/PATCHv2 1/2] Common/command: Guard strchr/strlen from NULL pointer

2010-11-27 Thread Wolfgang Denk
Dear Thomas Weber, In message <1290600472-23147-1-git-send-email-we...@corscience.de> you wrote: > Guard strchr/strlen from being called with NULL pointer. > This line is crashing when command "env" is called without subcommand. > > The cmd is NULL in this case because the calling function "do_en

[U-Boot] [RFC/PATCHv2 1/2] Common/command: Guard strchr/strlen from NULL pointer

2010-11-24 Thread Thomas Weber
Guard strchr/strlen from being called with NULL pointer. This line is crashing when command "env" is called without subcommand. The cmd is NULL in this case because the calling function "do_env" decremented the argc without checking if there are still arguments available. Signed-off-by: Thomas We