projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b645f95
)
imx: image-container: Fix container header checking
author
Ye Li
<ye.li@nxp.com>
Thu, 15 Jun 2023 10:09:16 +0000
(18:09 +0800)
committer
Stefano Babic
<sbabic@denx.de>
Thu, 13 Jul 2023 09:29:40 +0000
(11:29 +0200)
Checking container header tag and version is wrong, it causes to fail
to bypass invalid container
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/image-container.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-imx/image-container.c
b/arch/arm/mach-imx/image-container.c
index
5b059a6
..
745de13
100644
(file)
--- 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;
}