binutils/SOURCES/binutils-CVE-2018-7642.patch

18 lines
658 B
Diff
Raw Normal View History

2019-07-30 04:12:55 +00:00
--- 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;
}