diff options
Diffstat (limited to 'common/elf.c')
-rw-r--r-- | common/elf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/elf.c b/common/elf.c index 0e92661e1a..bd97858c89 100644 --- a/common/elf.c +++ b/common/elf.c @@ -119,6 +119,11 @@ static int elf_check_image(struct elf_image *elf) return -ENOEXEC; } + if (!elf_hdr_e_phnum(elf, elf->buf)) { + pr_err("No phdr found.\n"); + return -ENOEXEC; + } + return 0; } |