aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-01-16 22:30:19 +0000
committerAlan Modra <amodra@gmail.com>2012-01-16 22:30:19 +0000
commit75cd47ede2b86ec445999b59c9741d60d1628ab3 (patch)
tree5085adc4f506389a4d554c07d8fc158b2fb5b86c /bfd/elf32-ppc.c
parentd04550a6d725119a01c38046a7afd3a7bfddef5a (diff)
downloadfsf-binutils-gdb-75cd47ede2b86ec445999b59c9741d60d1628ab3.zip
fsf-binutils-gdb-75cd47ede2b86ec445999b59c9741d60d1628ab3.tar.gz
fsf-binutils-gdb-75cd47ede2b86ec445999b59c9741d60d1628ab3.tar.bz2
* elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
trailing garbage in the note. * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 18922dc..bbf54a4 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1,6 +1,6 @@
/* PowerPC-specific support for 32-bit ELF
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -1920,7 +1920,7 @@ ppc_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type, ...)
va_list ap;
va_start (ap, note_type);
- memset (data, 0, 32);
+ memset (data, 0, sizeof (data));
strncpy (data + 32, va_arg (ap, const char *), 16);
strncpy (data + 48, va_arg (ap, const char *), 80);
va_end (ap);