diff options
author | Cristi Magherusan <cristi.magherusan@net.utcluj.ro> | 2009-09-25 22:21:47 +0000 |
---|---|---|
committer | Cristi Magherusan <Cristi.Magherusan@net.utcluj.ro> | 2009-09-25 22:21:47 +0000 |
commit | 19a99c6965511db908a56018c0bb586ce11ee157 (patch) | |
tree | f12036cfa84febb6bf3ab8be91c9ef787cd7caf6 /util/cbfstool | |
parent | 6bd571e060d65257c9a7ba0f87c991dbdac0b582 (diff) |
check for ELF payloads in cbfstool
Signed-off-by: Cristi Magherusan <cristi.magherusan@net.utcluj.ro>
Acked-by: Cristi Magherusan <cristi.magherusan@net.utcluj.ro>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4678 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/cbfstool')
-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; |