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
This commit is contained in:
Cristi Magherusan 2009-09-25 22:21:47 +00:00 committed by Cristi Magherusan
parent 6bd571e060
commit 19a99c6965
1 changed files with 6 additions and 0 deletions

View File

@ -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;