* environ.cc (build_env): Clear envblock and return NULL on attempt to use env
var > 32K. * spawn.cc (spawn_guts): Set E2BIG if build_env detects an error.
This commit is contained in:
@@ -624,6 +624,11 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
||||
cygheap->user.deimpersonate ();
|
||||
|
||||
moreinfo->envp = build_env (envp, envblock, moreinfo->envc, real_path.iscygexec ());
|
||||
if (!moreinfo->envp || !envblock)
|
||||
{
|
||||
set_errno (E2BIG);
|
||||
goto out;
|
||||
}
|
||||
ciresrv.set (chtype, real_path.iscygexec ());
|
||||
ciresrv.moreinfo = moreinfo;
|
||||
|
||||
|
Reference in New Issue
Block a user