in particular, if the old environment is NULL. Among making it less surprising for userspace to observe NULL environ, the change also prevents NULL deref in __rebuild_environ() when terminating the empty as NULL environment with the NULL pointer. Reported by: Leo Bicknell <bicknell@ufp.org> PR: 298747
Details
Details
- Reviewers
emaste markj - Group Reviewers
secteam - Commits
- rGdec68aeff8ce: libc/stdlib/getenv.c: always allocate new environment
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable