diff options
author | Alan Modra <amodra@gmail.com> | 2012-02-26 23:12:16 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-02-26 23:12:16 +0000 |
commit | cb83c803b7843ffc089722a5570012d7492f51f2 (patch) | |
tree | edf50629fc918225eea9f7899553c55eeb2fbabb /bfd/elf32-spu.c | |
parent | 3899aa3b5ac5612c0501d881514cefcf94b4e5e7 (diff) | |
download | gdb-cb83c803b7843ffc089722a5570012d7492f51f2.zip gdb-cb83c803b7843ffc089722a5570012d7492f51f2.tar.gz gdb-cb83c803b7843ffc089722a5570012d7492f51f2.tar.bz2 |
* elf32-spu.c (build_stub): Fix malloc under-allocation.
Diffstat (limited to 'bfd/elf32-spu.c')
-rw-r--r-- | bfd/elf32-spu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index cff9185..ab13b7b 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -1,6 +1,7 @@ /* SPU specific support for 32-bit ELF - Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1425,7 +1426,7 @@ build_stub (struct bfd_link_info *info, add = (int) irela->r_addend & 0xffffffff; if (add != 0) len += 1 + 8; - name = bfd_malloc (len); + name = bfd_malloc (len + 1); if (name == NULL) return FALSE; |