From: Ye Li Date: Thu, 15 Jun 2023 10:09:16 +0000 (+0800) Subject: imx: image-container: Fix container header checking X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=3b5c1d0ea100933d3fadda82051ede62b5209c89;p=u-boot.git imx: image-container: Fix container header checking Checking container header tag and version is wrong, it causes to fail to bypass invalid container Reviewed-by: Peng Fan Signed-off-by: Ye Li Signed-off-by: Peng Fan --- diff --git a/arch/arm/mach-imx/image-container.c b/arch/arm/mach-imx/image-container.c index 5b059a6429..745de13063 100644 --- a/arch/arm/mach-imx/image-container.c +++ b/arch/arm/mach-imx/image-container.c @@ -31,7 +31,7 @@ int get_container_size(ulong addr, u16 *header_length) u32 max_offset = 0, img_end; phdr = (struct container_hdr *)addr; - if (phdr->tag != 0x87 && phdr->version != 0x0) { + if (phdr->tag != 0x87 || phdr->version != 0x0) { debug("Wrong container header\n"); return -EFAULT; }