diff --git a/kpatch-build/kpatch-elf.c b/kpatch-build/kpatch-elf.c index 54abad3..7b79dd3 100644 --- a/kpatch-build/kpatch-elf.c +++ b/kpatch-build/kpatch-elf.c @@ -626,6 +626,7 @@ struct section *create_section_pair(struct kpatch_elf *kelf, char *name, sec->data->d_buf = malloc(size); if (!sec->data->d_buf) ERROR("malloc"); + memset(sec->data->d_buf, 0, size); sec->data->d_size = size; sec->data->d_type = ELF_T_BYTE;