mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
* simple.c (bfd_simple_get_relocated_section_contents): Use larger
of rawsize and size for buffer.
This commit is contained in:
parent
fc7593dfa0
commit
588f62fc96
@ -1,3 +1,8 @@
|
||||
2009-03-16 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* simple.c (bfd_simple_get_relocated_section_contents): Use larger
|
||||
of rawsize and size for buffer.
|
||||
|
||||
2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
|
||||
|
@ -210,7 +210,8 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
|
||||
data = NULL;
|
||||
if (outbuf == NULL)
|
||||
{
|
||||
data = bfd_malloc (sec->size);
|
||||
bfd_size_type amt = sec->rawsize > sec->size ? sec->rawsize : sec->size;
|
||||
data = bfd_malloc (amt);
|
||||
if (data == NULL)
|
||||
return NULL;
|
||||
outbuf = data;
|
||||
|
Loading…
Reference in New Issue
Block a user