
27 Nov
2010
27 Nov
'10
11:19 p.m.
Dear Thomas Weber,
In message 1290600472-23147-1-git-send-email-weber@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_env" decremented the argc without checking if there are still arguments available.
Signed-off-by: Thomas Weber weber@corscience.de
Changes for v2:
- Use shorter way to leave function in error case.
common/command.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
Applied, thanks.
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@denx.de
Every little picofarad has a nanohenry all its own. - Don Vonada