summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-06-03 08:30:35 -0700
committerPetr Baudis <pasky@suse.cz>2009-06-06 04:48:30 +0200
commite926cb177490407dfea3fc6c181a272b7b8a2a20 (patch)
treed4a8268a4f15da504d1a4fed09bdf9c2d0236697
parent1e639628d118eb75a2e0de99debbba6e949cdbae (diff)
downloadglibc-e926cb177490407dfea3fc6c181a272b7b8a2a20.tar.gz
glibc-e926cb177490407dfea3fc6c181a272b7b8a2a20.tar.xz
glibc-e926cb177490407dfea3fc6c181a272b7b8a2a20.zip
Terminate correct buffer.
Little typo could cause additional characters to be printed.
(cherry picked from commit fbb04b35e7997070feec74e0fd46953faef71f9e)
-rw-r--r--ChangeLog4
-rw-r--r--elf/dl-sysdep.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d9cc2966b..1211e1df5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-03  Ulrich Drepper  <drepper@redhat.com>
+
+	* elf/dl-sysdep.c (_dl_show_auxv): Terminate correct string.
+
 2009-05-30  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* configure.in: Move AC_CANONICAL_HOST before first use of $host
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index db1001253c..5700272f10 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -335,7 +335,7 @@ _dl_show_auxv (void)
 
       /* Unknown value: print a generic line.  */
       char buf2[17];
-      buf[sizeof (buf2) - 1] = '\0';
+      buf2[sizeof (buf2) - 1] = '\0';
       const char *val2 = _itoa ((unsigned long int) av->a_un.a_val,
 				buf2 + sizeof buf2 - 1, 16, 0);
       const char *val =  _itoa ((unsigned long int) av->a_type,