mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
* elfcomm.c (get_archive_member_name): Prevent seg-fault if a
corrupt archive uses long names but has no long name table.
This commit is contained in:
@ -586,6 +586,12 @@ get_archive_member_name (struct archive_info *arch,
|
||||
char *member_file_name;
|
||||
char *member_name;
|
||||
|
||||
if (arch->longnames == NULL || arch->longnames_size == 0)
|
||||
{
|
||||
error (_("Archive member uses long names, but no longname table found\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
arch->nested_member_origin = 0;
|
||||
k = j = strtoul (arch->arhdr.ar_name + 1, &endp, 10);
|
||||
if (arch->is_thin_archive && endp != NULL && * endp == ':')
|
||||
|
Reference in New Issue
Block a user