• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修订版b02cd3e978e9273074f7cbe2ca1d5b372225a56d (tree)
时间2017-04-23 20:03:35
作者Alan Modra <amodra@gmai...>
CommiterAlan Modra

Log Message

PR 21415, objdump fails to check bfd_get_section_contents status

PR 21415
* objdump.c (disassemble_section): Check bfd_get_section_contents
status.

更改概述

差异

--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,11 @@
11 2017-04-23 Alan Modra <amodra@gmail.com>
22
3+ PR 21415
4+ * objdump.c (disassemble_section): Check bfd_get_section_contents
5+ status.
6+
7+2017-04-23 Alan Modra <amodra@gmail.com>
8+
39 PR 21408
410 * dwarf.c (display_debug_lines_decoded): Don't segfault on NULL
511 file_table.
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -2174,7 +2174,12 @@ disassemble_section (bfd *abfd, asection *section, void *inf)
21742174
21752175 data = (bfd_byte *) xmalloc (datasize);
21762176
2177- bfd_get_section_contents (abfd, section, data, 0, datasize);
2177+ if (!bfd_get_section_contents (abfd, section, data, 0, datasize))
2178+ {
2179+ non_fatal (_("Reading section %s failed because: %s"),
2180+ section->name, bfd_errmsg (bfd_get_error ()));
2181+ return;
2182+ }
21782183
21792184 paux->sec = section;
21802185 pinfo->buffer = data;