diff --git a/option.cc b/option.cc index d1b7dc82..3207b8ee 100644 --- a/option.cc +++ b/option.cc @@ -151,7 +151,7 @@ void process_environment(std::list& options, int tag_len = tag.length(); for (char ** p = envp; *p; p++) - if (std::strncmp(*p, tag_p, tag_len) == 0) { + if (! tag_p || std::strncmp(*p, tag_p, tag_len) == 0) { char buf[128]; char * r = buf; char * q;