Blob Blame History Raw
diff -rup binutils.orig/binutils/dwarf.c binutils-2.27/binutils/dwarf.c
--- binutils.orig/binutils/dwarf.c	2018-05-30 09:57:23.401080405 +0100
+++ binutils-2.27/binutils/dwarf.c	2018-05-30 09:57:33.578971357 +0100
@@ -5195,6 +5195,13 @@ display_debug_ranges (struct dwarf_secti
 	  continue;
 	}
 
+      if (next < section_begin || next >= finish)
+	{
+	  warn (_("Corrupt offset (%#8.8lx) in range entry %u\n"),
+		(unsigned long) offset, i);
+	  continue;
+	}
+
       if (dwarf_check != 0 && i > 0)
 	{
 	  if (start < next)