mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-01 06:41:51 -04:00
libdwfl: dwfl_module_getdwarf.c don't use symtab with bogus sh_entsize.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2014-11-14 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* dwfl_module_getdwarf.c (load_symtab): Don't use tables which have
|
||||
a zero sh_entsize.
|
||||
|
||||
2014-11-10 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* dwfl_module_getdwarf.c (find_dynsym): New inner function
|
||||
|
||||
@@ -575,6 +575,8 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile,
|
||||
switch (shdr->sh_type)
|
||||
{
|
||||
case SHT_SYMTAB:
|
||||
if (shdr->sh_entsize == 0)
|
||||
break;
|
||||
symtab = true;
|
||||
*symscn = scn;
|
||||
*symfile = file;
|
||||
@@ -589,6 +591,8 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile,
|
||||
if (symtab)
|
||||
break;
|
||||
/* Use this if need be, but keep looking for SHT_SYMTAB. */
|
||||
if (shdr->sh_entsize == 0)
|
||||
break;
|
||||
*symscn = scn;
|
||||
*symfile = file;
|
||||
*strshndx = shdr->sh_link;
|
||||
|
||||
Reference in New Issue
Block a user