mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-15 06:41:47 +03:00
Update.
2001-09-18 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (ptmalloc_init): Handle _environ==NULL. Reported by B. D. Elliott <bde@nwlink.com> [PR libc/2541]. 2001-09-18 Andreas Schwab <schwab@suse.de> * elf/dl-load.c (_dl_map_object_from_fd): Update handling of scope list, now that l_scope is a pointer. * elf/dl-open.c (dl_open_worker): Fix thinko when enlarging the scope list. 2001-09-18 kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/dl-machine.h (elf_machine_rela): Fix reverse condition. (elf_machine_rela_relative): Add a missing declaration. 2001-09-18 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: New. * sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed: New. * sysdeps/unix/sysv/linux/configure.in: Add ia64 and s390 ldd-rewrite scripts. 2001-09-18 Ulrich Drepper <drepper@redhat.com> * elf/ldd.bash.in: Update copyright message. 2001-09-17 H.J. Lu <hjl@gnu.org> * hurd/hurdmalloc.c (bcopy): Removed. (realloc): Replace bcopy with memcpy. * hurd/path-lookup.c (file_name_path_scan): Likewise. * resolv/gethnamaddr.c (map_v4v6_address): Likewise. * sunrpc/rpcinfo.c (pmapdump): Likewise. * resolv/gethnamaddr.c (getanswer): Replace bcopy with memmove. (gethostbyaddr): Likewise. * sunrpc/rpcinfo.c (get_inet_address): Likewise. 2001-09-18 Ulrich Drepper <drepper@redhat.com> * sysdeps/gnu/eval.c: Removed.
This commit is contained in:
@ -1766,49 +1766,49 @@ ptmalloc_init __MALLOC_P((void))
|
||||
secure = __libc_enable_secure;
|
||||
#ifdef _LIBC
|
||||
s = NULL;
|
||||
{
|
||||
char **runp = _environ;
|
||||
char *envline;
|
||||
if (_environ != NULL)
|
||||
{
|
||||
char **runp = _environ;
|
||||
char *envline;
|
||||
|
||||
while (__builtin_expect ((envline = next_env_entry (&runp)) != NULL,
|
||||
0))
|
||||
{
|
||||
size_t len = strcspn (envline, "=");
|
||||
while (__builtin_expect ((envline = next_env_entry (&runp)) != NULL, 0))
|
||||
{
|
||||
size_t len = strcspn (envline, "=");
|
||||
|
||||
if (envline[len] != '=')
|
||||
/* This is a "MALLOC_" variable at the end of the string
|
||||
without a '=' character. Ignore it since otherwise we
|
||||
will access invalid memory below. */
|
||||
continue;
|
||||
if (envline[len] != '=')
|
||||
/* This is a "MALLOC_" variable at the end of the string
|
||||
without a '=' character. Ignore it since otherwise we
|
||||
will access invalid memory below. */
|
||||
continue;
|
||||
|
||||
switch (len)
|
||||
{
|
||||
case 6:
|
||||
if (memcmp (envline, "CHECK_", 6) == 0)
|
||||
s = &envline[7];
|
||||
break;
|
||||
case 8:
|
||||
if (! secure && memcmp (envline, "TOP_PAD_", 8) == 0)
|
||||
mALLOPt(M_TOP_PAD, atoi(&envline[9]));
|
||||
break;
|
||||
case 9:
|
||||
if (! secure && memcmp (envline, "MMAP_MAX_", 9) == 0)
|
||||
mALLOPt(M_MMAP_MAX, atoi(&envline[10]));
|
||||
break;
|
||||
case 15:
|
||||
if (! secure)
|
||||
{
|
||||
if (memcmp (envline, "TRIM_THRESHOLD_", 15) == 0)
|
||||
mALLOPt(M_TRIM_THRESHOLD, atoi(&envline[16]));
|
||||
else if (memcmp (envline, "MMAP_THRESHOLD_", 15) == 0)
|
||||
mALLOPt(M_MMAP_THRESHOLD, atoi(&envline[16]));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (len)
|
||||
{
|
||||
case 6:
|
||||
if (memcmp (envline, "CHECK_", 6) == 0)
|
||||
s = &envline[7];
|
||||
break;
|
||||
case 8:
|
||||
if (! secure && memcmp (envline, "TOP_PAD_", 8) == 0)
|
||||
mALLOPt(M_TOP_PAD, atoi(&envline[9]));
|
||||
break;
|
||||
case 9:
|
||||
if (! secure && memcmp (envline, "MMAP_MAX_", 9) == 0)
|
||||
mALLOPt(M_MMAP_MAX, atoi(&envline[10]));
|
||||
break;
|
||||
case 15:
|
||||
if (! secure)
|
||||
{
|
||||
if (memcmp (envline, "TRIM_THRESHOLD_", 15) == 0)
|
||||
mALLOPt(M_TRIM_THRESHOLD, atoi(&envline[16]));
|
||||
else if (memcmp (envline, "MMAP_THRESHOLD_", 15) == 0)
|
||||
mALLOPt(M_MMAP_THRESHOLD, atoi(&envline[16]));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (! secure)
|
||||
{
|
||||
|
Reference in New Issue
Block a user