Browse Source

as man page states, lower case undoes upper case. add support for little s,

no security, for consistency.  use of this option is discouraged. :)
ok deraadt guenther millert
OPENBSD_5_0
tedu 13 years ago
parent
commit
d874c625f1
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/lib/libc/stdlib/malloc.c

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

@ -1,4 +1,4 @@
/* $OpenBSD: malloc.c,v 1.137 2011/05/20 20:02:08 otto Exp $ */
/* $OpenBSD: malloc.c,v 1.138 2011/06/20 18:04:06 tedu Exp $ */
/* /*
* Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
* *
@ -548,6 +548,10 @@ omalloc_init(struct dir_info **dp)
case 'R': case 'R':
mopts.malloc_realloc = 1; mopts.malloc_realloc = 1;
break; break;
case 's':
mopts.malloc_freeprot = mopts.malloc_junk = 0;
mopts.malloc_guard = 0;
break;
case 'S': case 'S':
mopts.malloc_freeprot = mopts.malloc_junk = 1; mopts.malloc_freeprot = mopts.malloc_junk = 1;
mopts.malloc_guard = MALLOC_PAGESIZE; mopts.malloc_guard = MALLOC_PAGESIZE;


Loading…
Cancel
Save