]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Terminate correct buffer.
authorUlrich Drepper <drepper@redhat.com>
Wed, 3 Jun 2009 15:30:35 +0000 (08:30 -0700)
committerPetr Baudis <pasky@suse.cz>
Sat, 6 Jun 2009 02:48:30 +0000 (04:48 +0200)
Little typo could cause additional characters to be printed.
(cherry picked from commit fbb04b35e7997070feec74e0fd46953faef71f9e)

ChangeLog
elf/dl-sysdep.c

index 6d9cc2966bbdae4c3e4a8c8a30e7fb9116a3ff3f..1211e1df5ea22ed35f90e9e60e212c2e6c98e061 100644 (file)
--- 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
index db1001253c5a852ec507fad4fa532051325515d4..5700272f10c24ec8c8d849df50a80910b3ba624b 100644 (file)
@@ -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,