commit | 97ea46f518e75e3b32b65e9261d16756c3581bb2 | [log] [tgz] |
---|---|---|
author | Thomas Weber <weber@corscience.de> | Wed Nov 24 13:07:51 2010 +0100 |
committer | Wolfgang Denk <wd@denx.de> | Sat Nov 27 23:35:13 2010 +0100 |
tree | 4fd24ea97e78fb6f140d15db2ff4e5f5b85f1837 | |
parent | 4d282650cae86790a6f54aaf9630e507d85a79a6 [diff] |
Common/command: Guard strchr/strlen from NULL pointer 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>