Skip to content
Snippets Groups Projects
Commit fbd23b9b authored by Madan Srinivas's avatar Madan Srinivas Committed by Tom Rini
Browse files

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: 0830d72b ("arm: am33xx: security: adds auth support for encrypted images")
Signed-off-by: default avatarMadan Srinivas <madans@ti.com>
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
Reviewed-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
parent 0d8c1df8
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
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