From 5dab83240f013a925ddec5b7e0056ede5112097b Mon Sep 17 00:00:00 2001 From: Thorsten Lockert Date: Thu, 26 Sep 1996 15:22:20 +0000 Subject: Make sure we don't dereference stray pointer when running suid or sgid --- lib/libc/stdlib/malloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libc') 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; -- cgit v1.2.3