From d01d63190bf60f378406ea2846a35790a1d144f6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 28 Aug 1999 22:34:29 +0000 Subject: Update. 1999-08-28 Ulrich Drepper * malloc/malloc.c (ptmalloc_init): Don't use variables to set thresholds for SUID binaries. [PR libc/1277] 1999-08-28 Andreas Jaeger * manual/install.texi (Running make install): Give examples for timezone and locale installation. 1999-08-28 Zack Weinberg * glibcbug.in: Get CCVERSION from autoconf substitution. * configure.in: Calculate and substitute CCVERSION. 1999-08-28 Andreas Jaeger * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Fix sa_flags, partially reverting a patch from 1998-12-29. We just can't change the flags, kernels with different flags lead to incompatibilities. --- malloc/malloc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'malloc') diff --git a/malloc/malloc.c b/malloc/malloc.c index eba2a60915..98a248b894 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -305,6 +305,10 @@ # include #endif +#ifndef _LIBC +# define __secure_getenv(Str) getenv (Str) +#endif + /* Macros for handling mutexes and thread-specific data. This is included early, because some thread-related header files (such as pthread.h) should be included before any others. */ @@ -1674,13 +1678,13 @@ ptmalloc_init __MALLOC_P((void)) thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_init_all); #endif /* !defined NO_THREADS */ #if defined _LIBC || defined MALLOC_HOOKS - if((s = getenv("MALLOC_TRIM_THRESHOLD_"))) + if((s = __secure_getenv("MALLOC_TRIM_THRESHOLD_"))) mALLOPt(M_TRIM_THRESHOLD, atoi(s)); - if((s = getenv("MALLOC_TOP_PAD_"))) + if((s = __secure_getenv("MALLOC_TOP_PAD_"))) mALLOPt(M_TOP_PAD, atoi(s)); - if((s = getenv("MALLOC_MMAP_THRESHOLD_"))) + if((s = __secure_getenv("MALLOC_MMAP_THRESHOLD_"))) mALLOPt(M_MMAP_THRESHOLD, atoi(s)); - if((s = getenv("MALLOC_MMAP_MAX_"))) + if((s = __secure_getenv("MALLOC_MMAP_MAX_"))) mALLOPt(M_MMAP_MAX, atoi(s)); s = getenv("MALLOC_CHECK_"); #ifndef NO_THREADS -- cgit v1.2.3-70-g09d2