mirror of
https://github.com/dynup/kpatch
synced 2025-03-11 05:07:53 +00:00
Merge pull request #970 from wwheart/master
kpatch-elf: fix Segmentation fault when d_type not set properly
This commit is contained in:
commit
288568653a
@ -647,6 +647,7 @@ struct section *create_section_pair(struct kpatch_elf *kelf, char *name,
|
||||
relasec->data = malloc(sizeof(*relasec->data));
|
||||
if (!relasec->data)
|
||||
ERROR("malloc");
|
||||
relasec->data->d_type = ELF_T_RELA;
|
||||
|
||||
/* set section header */
|
||||
relasec->sh.sh_type = SHT_RELA;
|
||||
|
Loading…
Reference in New Issue
Block a user