summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-09-26 15:22:20 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-09-26 15:22:20 +0000
commit5dab83240f013a925ddec5b7e0056ede5112097b (patch)
treebf00b6d7cf85730383a8f96d9bc531a3a54d29d6 /lib/libc/stdlib/malloc.c
parent59c8f5f4b19f4a2a7220e8bd2ac6159d136809b5 (diff)
Make sure we don't dereference stray pointer when running suid or sgid
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r--lib/libc/stdlib/malloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index ec56b0d3904..c806f2dd850 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -8,7 +8,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: malloc.c,v 1.15 1996/09/26 04:49:56 tholo Exp $";
+static char rcsid[] = "$OpenBSD: malloc.c,v 1.16 1996/09/26 15:22:19 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -535,6 +535,8 @@ malloc_init ()
} else if (i == 2) {
p = malloc_options;
}
+ else
+ p = NULL;
for (; p && *p; p++) {
switch (*p) {
case '>': malloc_cache <<= 1; break;