From 2cf6fe3fc762fcca22463c718209eb579d01e952 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 17 Feb 2005 01:21:19 +0000 Subject: [PATCH] (process_environment): If the environment tag is NULL (which is really should never be), then don't use it. --- option.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;