mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
PR 21415, objdump fails to check bfd_get_section_contents status
PR 21415 * objdump.c (disassemble_section): Check bfd_get_section_contents status.
This commit is contained in:
parent
7eacd66b08
commit
b02cd3e978
@ -1,3 +1,9 @@
|
||||
2017-04-23 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 21415
|
||||
* objdump.c (disassemble_section): Check bfd_get_section_contents
|
||||
status.
|
||||
|
||||
2017-04-23 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 21408
|
||||
|
@ -2174,7 +2174,12 @@ disassemble_section (bfd *abfd, asection *section, void *inf)
|
||||
|
||||
data = (bfd_byte *) xmalloc (datasize);
|
||||
|
||||
bfd_get_section_contents (abfd, section, data, 0, datasize);
|
||||
if (!bfd_get_section_contents (abfd, section, data, 0, datasize))
|
||||
{
|
||||
non_fatal (_("Reading section %s failed because: %s"),
|
||||
section->name, bfd_errmsg (bfd_get_error ()));
|
||||
return;
|
||||
}
|
||||
|
||||
paux->sec = section;
|
||||
pinfo->buffer = data;
|
||||
|
Loading…
Reference in New Issue
Block a user