bb781d5f31
Fix for PR 22905 - crashing objdump by passing it a corrupt DWARF file. (#1553122) Fix for PR 22741 - crashing objdump by passing it a corrupt COFF file. (#1571918)
18 lines
658 B
Diff
18 lines
658 B
Diff
--- binutils.orig/bfd/aoutx.h 2018-04-26 15:14:18.411450291 +0100
|
|
+++ binutils-2.30/bfd/aoutx.h 2018-04-26 17:22:38.328770529 +0100
|
|
@@ -2283,10 +2283,12 @@ NAME (aout, swap_std_reloc_in) (bfd *abf
|
|
if (r_baserel)
|
|
r_extern = 1;
|
|
|
|
- if (r_extern && r_index > symcount)
|
|
+ if (r_extern && r_index >= symcount)
|
|
{
|
|
/* We could arrange to return an error, but it might be useful
|
|
- to see the file even if it is bad. */
|
|
+ to see the file even if it is bad. FIXME: Of course this
|
|
+ means that objdump -r *doesn't* see the actual reloc, and
|
|
+ objcopy silently writes a different reloc. */
|
|
r_extern = 0;
|
|
r_index = N_ABS;
|
|
}
|