aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-06-25 01:56:15 +0000
committerRoland McGrath <roland@gnu.org>2003-06-25 01:56:15 +0000
commit1775abf061fd7a1868bb7e38fad8cb0a27f443fb (patch)
tree4a231e4f173c622fc6812ca47d16343a8d55e40a /sysdeps
parent4d4ac6ad6b1717dc09a3749b9118ff6e4558f202 (diff)
downloadglibc-1775abf061fd7a1868bb7e38fad8cb0a27f443fb.zip
glibc-1775abf061fd7a1868bb7e38fad8cb0a27f443fb.tar.gz
glibc-1775abf061fd7a1868bb7e38fad8cb0a27f443fb.tar.bz2
* 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 <roland@redhat.com> * elf/elf.h (PT_GNU_STACK): New macro.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/dl-sysdep.c5
1 files changed, 3 insertions, 2 deletions
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;