mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 12:41:32 +00:00
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: Stefano Babic <sbabic@denx.de> CC: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
9400f8fa7c
commit
163967905f
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue