diff --git a/doc/Changelog b/doc/Changelog index 5bc45e8..8b5a28d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,8 @@ sysvinit (2.89dsf) UNRELEASED; urgency=low [ Werner Fink ] + * Do not forget room for last NULL of new environment (was + local bug 35866) * Handle deleted binaries in pidof (was local bug #34992) * Allow init to delte extra environment variables (was local bug #35858) diff --git a/src/init.c b/src/init.c index ad97d27..51f5a55 100644 --- a/src/init.c +++ b/src/init.c @@ -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;