https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=298747

--- Comment #6 from [email protected] ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=dec68aeff8ce0ce154e93325a74bba6af71c87af

commit dec68aeff8ce0ce154e93325a74bba6af71c87af
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-09-24 18:30:57 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-10-02 19:48:42 +0000

    libc/stdlib/getenv.c:  always allocate new environment

    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 <[email protected]>
    PR:     298747
    Reviewed by:    emaste, markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D59996

 lib/libc/stdlib/getenv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to