From 6d13fb6c1b7adc7a31b6ca313586cb4cbab03868 Mon Sep 17 00:00:00 2001 From: tholo <> Date: Thu, 26 Sep 1996 15:22:19 +0000 Subject: [PATCH] Make sure we don't dereference stray pointer when running suid or sgid --- src/lib/libc/stdlib/malloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index ec56b0d3..c806f2dd 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/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;