about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-14 11:13:31 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-14 11:13:31 -0400
commitda3c19ef5aab5c073baa57afd1f5bf9bf8746460 (patch)
treedd86a720170f5f33e04b07f57eb120524ff5d9e4 /sysdeps
parentca408c157c71edebf45862c35738eb2614cbcd77 (diff)
downloadglibc-da3c19ef5aab5c073baa57afd1f5bf9bf8746460.tar.gz
glibc-da3c19ef5aab5c073baa57afd1f5bf9bf8746460.tar.xz
glibc-da3c19ef5aab5c073baa57afd1f5bf9bf8746460.zip
Fix potential problem with out-of-scope buffer
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/elf/backtracesymsfd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/generic/elf/backtracesymsfd.c b/sysdeps/generic/elf/backtracesymsfd.c
index f0ab71587f..0160ac158b 100644
--- a/sysdeps/generic/elf/backtracesymsfd.c
+++ b/sysdeps/generic/elf/backtracesymsfd.c
@@ -1,5 +1,5 @@
 /* Write formatted list with names for addresses in backtrace to a file.
-   Copyright (C) 1998,2000,2003,2005,2009 Free Software Foundation, Inc.
+   Copyright (C) 1998,2000,2003,2005,2009,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -45,6 +45,7 @@ __backtrace_symbols_fd (array, size, fd)
   for (cnt = 0; cnt < size; ++cnt)
     {
       char buf[WORD_WIDTH];
+      char buf2[WORD_WIDTH];
       Dl_info info;
       struct link_map *map;
       size_t last = 0;
@@ -59,7 +60,6 @@ __backtrace_symbols_fd (array, size, fd)
 
 	  if (info.dli_sname != NULL || map->l_addr != 0)
 	    {
-	      char buf2[WORD_WIDTH];
 	      size_t diff;
 
 	      iov[last].iov_base = (void *) "(";