mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
arm: am33xx: security: Fix size calculation on header
Fix the size calculation in the verify boot. The header size
should be subtracted from the image size, not be assigned to
the image size.
Fixes: 0830d72bb9
("arm: am33xx: security: adds auth support for encrypted images")
Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
This commit is contained in:
parent
0d8c1df8d8
commit
fbd23b9b94
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ int secure_boot_verify_image(void **image, size_t *size)
|
|||
*size = sig_addr - cert_addr; /* Subtract out the signature size */
|
||||
/* Subtract header if present */
|
||||
if (strncmp((char *)sig_addr, "CERT_ISW_", 9) == 0)
|
||||
*size = ((u32 *)*image)[HEADER_SIZE_OFFSET];
|
||||
*size -= ((u32 *)*image)[HEADER_SIZE_OFFSET];
|
||||
cert_size = *size;
|
||||
|
||||
/* Check if image load address is 32-bit aligned */
|
||||
|
|
Loading…
Reference in a new issue