Properly check for an out of range row index
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 1 Dec 2014 17:11:57 +0000 (09:11 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 1 Dec 2014 17:12:37 +0000 (09:12 -0800)
* dwarf.c (process_cu_tu_index): Properly check for an out of
range row index.

binutils/ChangeLog
binutils/dwarf.c

index 597e52a..e11c046 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * dwarf.c (process_cu_tu_index): Properly check for an out of
+       range row index.
+
 2014-12-01  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/17512
index d744929..7cfc45f 100644 (file)
@@ -6825,7 +6825,7 @@ process_cu_tu_index (struct dwarf_section *section, int do_display)
          if (row != 0)
            {
              /* PR 17531: file: a05f6ab3.  */
-             if (row >= nused)
+             if (row > nused)
                {
                  warn (_("Row index (%u) is larger than number of used entries (%u)\n"),
                        row, nused);