[Bug 268479] lib/libc/stdlib/getenv.c may have a problem with putenv()
| Newsgroups | gmane.os.freebsd.devel.standards |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268479 --- Comment #13 from Tatsuki Makino <[email protected]> --- 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.