mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-19 02:44:59 +08:00
libiberty: Check zero value shstrndx in simple-object-elf.c
From-SVN: r273718
This commit is contained in:
parent
c0cdef59af
commit
b1bc0f5035
@ -1,3 +1,8 @@
|
||||
2019-07-12 Ren Kimura <rkx1209dev@gmail.com>
|
||||
|
||||
* simple-object-elf.c (simple_object_elf_match): Check zero value shstrndx.
|
||||
This fixes a Bug 90924.
|
||||
|
||||
2019-07-22 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
|
||||
|
@ -548,7 +548,15 @@ simple_object_elf_match (unsigned char header[SIMPLE_OBJECT_MATCH_HEADER_LEN],
|
||||
XDELETE (eor);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
if (eor->shstrndx == 0)
|
||||
{
|
||||
*errmsg = "invalid ELF shstrndx == 0";
|
||||
*err = 0;
|
||||
XDELETE (eor);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (void *) eor;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user