Blob Blame History Raw
diff -rupN --no-dereference binutils-2.32/binutils/readelf.c binutils-2.32-new/binutils/readelf.c
--- binutils-2.32/binutils/readelf.c	2019-11-19 20:47:07.833624139 +0100
+++ binutils-2.32-new/binutils/readelf.c	2019-11-19 20:47:15.941671465 +0100
@@ -13234,7 +13234,7 @@ apply_relocations (Filedata *
 	    }
 
 	  rloc = start + rp->r_offset;
-	  if ((rloc + reloc_size) > end || (rloc < start))
+	  if (rloc >= end || (rloc + reloc_size) > end || (rloc < start))
 	    {
 	      warn (_("skipping invalid relocation offset 0x%lx in section %s\n"),
 		    (unsigned long) rp->r_offset,