mirror of
https://github.com/dynup/kpatch
synced 2025-01-03 03:02:01 +00:00
create-kpatch-module: check symtab in main()
Make sure symtab section was found before dereferencing it. Found by covscan, see issue #984 for full log. Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
5cd9833b0d
commit
04c0831705
@ -231,6 +231,9 @@ int main(int argc, char *argv[])
|
||||
kpatch_reindex_elements(kelf);
|
||||
|
||||
symtab = find_section_by_name(&kelf->sections, ".symtab");
|
||||
if (!symtab)
|
||||
ERROR("missing .symtab section");
|
||||
|
||||
list_for_each_entry(sec, &kelf->sections, list) {
|
||||
if (!is_rela_section(sec))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user