Browse Source

Make sure we don't dereference stray pointer when running suid or sgid

OPENBSD_2_0
tholo 28 years ago
parent
commit
6d13fb6c1b
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/lib/libc/stdlib/malloc.c

+ 3
- 1
src/lib/libc/stdlib/malloc.c View File

@ -8,7 +8,7 @@
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #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 */ #endif /* LIBC_SCCS and not lint */
/* /*
@ -535,6 +535,8 @@ malloc_init ()
} else if (i == 2) { } else if (i == 2) {
p = malloc_options; p = malloc_options;
} }
else
p = NULL;
for (; p && *p; p++) { for (; p && *p; p++) {
switch (*p) { switch (*p) {
case '>': malloc_cache <<= 1; break; case '>': malloc_cache <<= 1; break;


Loading…
Cancel
Save