diff options
-rw-r--r-- | util/cbfstool/cbfs-mkpayload.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/cbfstool/cbfs-mkpayload.c b/util/cbfstool/cbfs-mkpayload.c index f8cc1616b0..cdc5ffbb4f 100644 --- a/util/cbfstool/cbfs-mkpayload.c +++ b/util/cbfstool/cbfs-mkpayload.c @@ -48,6 +48,12 @@ int parse_elf_to_payload(unsigned char *input, unsigned char **output, struct cbfs_payload_segment *segs; int i; + if(!iself(input)){ + printf("Fatal error: the payload file is not in ELF format!\n"); + exit(1); + } + + comp_func_ptr compress = compression_function(algo); if (!compress) return -1; |