Fix an illegal memory access by readelf when displaying the contents of a corrupt IA64 binary.

PR 25526
	* readelf.c (process_ia64_vms_dynamic_relocs): Check to see if
	get_data is unable to load the string table.
This commit is contained in:
Nick Clifton 2020-02-27 16:28:25 +00:00
parent 3608f86c42
commit 736990c442
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2020-02-27 Nick Clifton <nickc@redhat.com>
PR 25526
* readelf.c (process_ia64_vms_dynamic_relocs): Check to see if
get_data is unable to load the string table.
2020-02-26 Alan Modra <amodra@gmail.com>
* elfedit.c: Indent labels correctly.

View File

@ -7104,6 +7104,7 @@ dump_ia64_vms_dynamic_fixups (Filedata * filedata,
(unsigned long) fixup->needed);
lib_name = "???";
}
printf (_("\nImage fixups for needed library #%d: %s - ident: %lx\n"),
(int) fixup->fixup_needed, lib_name, (long) fixup->needed_ident);
printf
@ -7203,6 +7204,8 @@ process_ia64_vms_dynamic_relocs (Filedata * filedata)
if (strtab == NULL)
strtab = get_data (NULL, filedata, dynamic_addr + strtab_off,
1, strtab_sz, _("dynamic string section"));
if (strtab == NULL)
strtab_sz = 0;
break;
case DT_IA_64_VMS_NEEDED_IDENT: