(process_environment): If the environment tag is NULL (which is really

should never be), then don't use it.
This commit is contained in:
John Wiegley 2005-02-17 01:21:19 +00:00
parent cd339f9ddc
commit 2cf6fe3fc7

View file

@ -151,7 +151,7 @@ void process_environment(std::list<option_t>& 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;