summaryrefslogtreecommitdiff
path: root/getconf/getconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'getconf/getconf.c')
-rw-r--r--getconf/getconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/getconf/getconf.c b/getconf/getconf.c
index 0f2b5d0..7c789dd 100644
--- a/getconf/getconf.c
+++ b/getconf/getconf.c
@@ -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;