Fix access violation when reporting sections that could not be dumped.
PR binutils/21147 * readelf.c (process_section_contents): Fix off by one error reporting un-dumped sections.
This commit is contained in:
parent
f84ce13b67
commit
0ee3043f58
|
@ -1,3 +1,9 @@
|
|||
2017-02-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/21147
|
||||
* readelf.c (process_section_contents): Fix off by one error
|
||||
reporting un-dumped sections.
|
||||
|
||||
2017-02-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/21139
|
||||
|
|
|
@ -13172,9 +13172,12 @@ process_section_contents (FILE * file)
|
|||
|
||||
/* Check to see if the user requested a
|
||||
dump of a section that does not exist. */
|
||||
while (i++ < num_dump_sects)
|
||||
if (dump_sects[i])
|
||||
warn (_("Section %d was not dumped because it does not exist!\n"), i);
|
||||
while (i < num_dump_sects)
|
||||
{
|
||||
if (dump_sects[i])
|
||||
warn (_("Section %d was not dumped because it does not exist!\n"), i);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue