Also check that the group header's sh_info field is valid.
PR 20089 * objcopy.c (group_signature): Fail if the input symbol table has not been loaded, or if the sh_info field of the group header is 0.
This commit is contained in:
parent
bcc3a8bca1
commit
c09ec62dde
2 changed files with 3 additions and 2 deletions
|
@ -1139,7 +1139,8 @@ group_signature (asection *group)
|
|||
Elf_Internal_Shdr *symhdr = elf_elfsections (abfd) [ghdr->sh_link];
|
||||
|
||||
if (symhdr->sh_type == SHT_SYMTAB
|
||||
&& ghdr->sh_info < symhdr->sh_size / bed->s->sizeof_sym)
|
||||
&& ghdr->sh_info > 0
|
||||
&& ghdr->sh_info < (symhdr->sh_size / bed->s->sizeof_sym))
|
||||
return isympp[ghdr->sh_info - 1];
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue