* Do not forget room for last NULL of new environment (was local bug 35866)

This commit is contained in:
Werner Fink
2012-03-19 12:50:36 +00:00
parent 99a0a2583f
commit ec06765756
2 changed files with 3 additions and 1 deletions

View File

@ -916,7 +916,7 @@ char **init_buildenv(int child)
for (n = 0; environ[n]; n++)
;
n += NR_EXTRA_ENV;
n += NR_EXTRA_ENV + 1; /* Also room for last NULL */
if (child)
n += 8;