Skip to content
Snippets Groups Projects
Commit 16396790 authored by Stefano Babic's avatar Stefano Babic Committed by Wolfgang Denk
Browse files

mkimage: ublimage must return if the header is not verified


Each image handler must return a not-zero velue if the
header is not recognized to allow the main program to
iterate to the next handler.

Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
CC: Heiko Schocher <hs@denx.de>
Acked-by: default avatarHeiko Schocher <hs@denx.de>
parent 9400f8fa
No related branches found
No related tags found
No related merge requests found
......@@ -214,6 +214,11 @@ static int ublimage_check_image_types(uint8_t type)
static int ublimage_verify_header(unsigned char *ptr, int image_size,
struct mkimage_params *params)
{
struct ubl_header *ubl_hdr = (struct ubl_header *)ptr;
if ((ubl_hdr->magic & 0xFFFFFF00) != UBL_MAGIC_BASE)
return -1;
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment