diff --git a/zdump/dfi_elf.c b/zdump/dfi_elf.c index fb2fc08a..7d098955 100644 --- a/zdump/dfi_elf.c +++ b/zdump/dfi_elf.c @@ -42,6 +42,8 @@ static int pt_load_add(Elf64_Phdr *phdr) STDERR("Dump file \"%s\" is a user space core dump\n", g.opts.device); } + if (phdr->p_memsz == 0) + return -EINVAL; if (phdr->p_offset + phdr->p_filesz > zg_size(g.fh)) return -EINVAL; if (phdr->p_filesz == 0) {