Fix the loading of the dynamic string table in a file without sections.

PR 23050
	* readelf.c (process_dynamic_section): Correct dynamic string
	table size calculation.
This commit is contained in:
Nick Clifton 2018-04-12 15:41:07 +01:00
parent 67f846b59b
commit 86c6c6df00
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2018-04-12 Nick Clifton <nickc@redhat.com>
PR 23050
* readelf.c (process_dynamic_section): Correct dynamic string
table size calculation.
2018-04-11 Alan Modra <amodra@gmail.com>
* ieee.c: Remove i960 support.

View File

@ -9639,7 +9639,7 @@ process_dynamic_section (Filedata * filedata)
if (archive_file_offset != 0)
str_tab_len = archive_file_size - offset;
else
str_tab_len = filedata->file_size;
str_tab_len = filedata->file_size - offset;
if (str_tab_len < 1)
{