Properly check for an out of range row index

* dwarf.c (process_cu_tu_index): Properly check for an out of
	range row index.
This commit is contained in:
H.J. Lu 2014-12-01 09:11:57 -08:00
parent 06614111d1
commit ef77750ef7
2 changed files with 6 additions and 1 deletions

View 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

View 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);