mirror of https://github.com/dynup/kpatch
create-diff-object: check ORC_STRUCT_SIZE correctness in kpatch_regenerate_orc_sections()
Since ORC_STRUCT_SIZE is used for division in kpatch_regenerate_orc_sections() we need to make sure that it is properly set. Found by covscan, see issue #984 for full log. Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
f0d071def7
commit
deb7719280
|
@ -2186,6 +2186,9 @@ static void kpatch_regenerate_orc_sections(struct kpatch_elf *kelf)
|
|||
return;
|
||||
orc_entry_size = atoi(str);
|
||||
|
||||
if (!orc_entry_size)
|
||||
ERROR("bad ORC_STRUCT_SIZE");
|
||||
|
||||
LIST_HEAD(newrelas);
|
||||
|
||||
orc_sec = find_section_by_name(&kelf->sections, ".orc_unwind");
|
||||
|
|
Loading…
Reference in New Issue