[Bug 268479] lib/libc/stdlib/getenv.c may have a problem with putenv()

[email protected]
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.