Commit ba7201c3 authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

Don't strlen(NULL) if environment is unset

parent 52eb352e
......@@ -389,7 +389,7 @@ int do_system_var(char *environment, char *system_var)
{
int var;
if(strlen(environment) != 0)
if(environment && strlen(environment) != 0)
{
fprintf(stderr, "Unsupported environment: %s\n", environment);
return EINVAL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment