* environ.cc (environ_init): Issue an error if GetEnvironmentStrings fails and

return.
This commit is contained in:
Christopher Faylor 2005-09-16 14:52:32 +00:00
parent 882dfbf776
commit 4dc2cfe588
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-09-16 Christopher Faylor <cgf@timesys.com>
* environ.cc (environ_init): Issue an error if GetEnvironmentStrings
fails and return.
2005-09-15 Christopher Faylor <cgf@timesys.com>
* pinfo.h (EXITCODE_SET): Move out of range of Windows error.

View File

@ -752,7 +752,13 @@ environ_init (char **envp, int envc)
/* Allocate space for environment + trailing NULL + CYGWIN env. */
lastenviron = envp = (char **) malloc ((4 + (envc = 100)) * sizeof (char *));
rawenv = GetEnvironmentStrings ();
if (!rawenv)
{
system_printf ("GetEnvironmentStrings returned NULL, %E");
return;
}
/* Current directory information is recorded as variables of the
form "=X:=X:\foo\bar; these must be changed into something legal