diff options
author | brian <brian@FreeBSD.org> | 2000-09-20 03:05:37 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-09-20 03:05:37 +0000 |
commit | 556211d48c47e44561f556f3b42d15c02e028039 (patch) | |
tree | 0909fe4d21123d1a89a50d04ccd362cd6069bf8b /lib/libc/stdlib/malloc.c | |
parent | 41b627fced8950f99775c2d5a75ef9d5c1dd0b3a (diff) | |
download | FreeBSD-src-556211d48c47e44561f556f3b42d15c02e028039.zip FreeBSD-src-556211d48c47e44561f556f3b42d15c02e028039.tar.gz |
Only realloc() environ if we're sure that we know where it came from.
The recent problems with sshd were due to sshd reassigning
`environ' when setenv() thinks it owns it. setenv() subsequently
realloc()s the new version of environ and *boom*
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 3b631e8..1bcc5e1 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -20,6 +20,7 @@ #ifndef MALLOC_EXTRA_SANITY #undef MALLOC_EXTRA_SANITY #endif +#define MALLOC_EXTRA_SANITY /* * What to use for Junk. This is the byte value we use to fill with |