mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-12 20:03:45 +08:00
This is a fix for PR binutils/16723, where a corrupt .gnu.version_r section could
send readelf into an infinite loop. * readelf.c (process_version_sections): Prevent an infinite loop when the vn_next field is zero but there are still entries to be processed.
This commit is contained in:
parent
ec92c392f7
commit
c24cf8b6e8
@ -1,3 +1,10 @@
|
||||
2014-03-19 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/16723
|
||||
* readelf.c (process_version_sections): Prevent an infinite loop
|
||||
when the vn_next field is zero but there are still entries to be
|
||||
processed.
|
||||
|
||||
2014-03-17 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-macho.c (dump_section_header): Renames of dump_section.
|
||||
|
@ -8971,6 +8971,12 @@ process_version_sections (FILE * file)
|
||||
if (j < ent.vn_cnt)
|
||||
warn (_("Missing Version Needs auxillary information\n"));
|
||||
|
||||
if (ent.vn_next == 0 && cnt < section->sh_info)
|
||||
{
|
||||
warn (_("Corrupt Version Needs structure - offset to next structure is zero with entries still left to be processed\n"));
|
||||
cnt = section->sh_info;
|
||||
break;
|
||||
}
|
||||
idx += ent.vn_next;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user