mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-12 10:28:59 +08:00
* simple.c (bfd_simple_get_relocated_section_contents): Use larger
of rawsize and size for buffer.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user