[Bug 268479] lib/libc/stdlib/getenv.c may have a problem with putenv()
Date: Mon, 26 Dec 2022 08:02:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268479 --- Comment #13 from Tatsuki Makino <tatsuki_makino@hotmail.com> --- The variable environ is a char**, so the memory containing strings such as UNAME_*= does not have to be continuous like "UNAME_s=\0UNAME_n=". The array holding the points where the envstring is stored is always contiguous in realloc. As you can see in /usr/src/lib/libc/stdlib/getenv.c when you try to rewrite env, it is replaced with the newly allocated memory. Is it? :) -- You are receiving this mail because: You are the assignee for the bug.