From 1775abf061fd7a1868bb7e38fad8cb0a27f443fb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 25 Jun 2003 01:56:15 +0000 Subject: [PATCH] * sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Catch uninitialized elements in the table instead of printing an empty name string. 2003-06-05 Roland McGrath * elf/elf.h (PT_GNU_STACK): New macro. --- ChangeLog | 9 +++++++++ sysdeps/generic/dl-sysdep.c | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bca1fe7..7a0b11a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-06-18 Roland McGrath + + * sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Catch uninitialized + elements in the table instead of printing an empty name string. + +2003-06-05 Roland McGrath + + * elf/elf.h (PT_GNU_STACK): New macro. + 2003-06-24 Ulrich Drepper * include/time.h: Define CLOCK_IDFIELD_SIZE. diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c index 166f4fa..278289e 100644 --- a/sysdeps/generic/dl-sysdep.c +++ b/sysdeps/generic/dl-sysdep.c @@ -228,7 +228,7 @@ _dl_show_auxv (void) static const struct { const char label[20]; - enum { dec, hex, str } form; + enum { unused, dec, hex, str } form; } auxvars[] = { [AT_EXECFD - 2] = { "AT_EXECFD: ", dec }, @@ -268,7 +268,8 @@ _dl_show_auxv (void) continue; } - if (idx < sizeof (auxvars) / sizeof (auxvars[0])) + if (idx < sizeof (auxvars) / sizeof (auxvars[0]) + && auxvars[idx].form != unused) { const char *val = av->a_un.a_ptr; -- 2.7.4