Skip to content
Snippets Groups Projects
Commit 7013c061 authored by Thomas Weber's avatar Thomas Weber Committed by Wolfgang Denk
Browse files

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: default avatarThomas Weber <weber@corscience.de>
parent 5904da02
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment