diff options
author | Mark Wielaard <mjw@redhat.com> | 2014-11-14 12:38:12 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2014-11-14 12:38:12 +0100 |
commit | df5ad1681cfc5c27df853299c5d8bfea5448bcca (patch) | |
tree | 378fe28f6ceee689f813c12b427114006c50e4ec /libdwfl/dwfl_module_getdwarf.c | |
parent | ad87d27664c982887ebbc88cf1a1fb431255d709 (diff) | |
download | elfutils-df5ad1681cfc5c27df853299c5d8bfea5448bcca.tar.gz |
libdwfl: dwfl_module_getdwarf.c don't use symtab with bogus sh_entsize.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'libdwfl/dwfl_module_getdwarf.c')
-rw-r--r-- | libdwfl/dwfl_module_getdwarf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c index adb94b4c..a20875b5 100644 --- a/libdwfl/dwfl_module_getdwarf.c +++ b/libdwfl/dwfl_module_getdwarf.c @@ -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; |