Commit fbd23b9b94e848f715b8b5d34793fadc60190b35
Committed by
Tom Rini
1 parent
0d8c1df8d8
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
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: 0830d72bb9f8 ("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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
arch/arm/mach-omap2/sec-common.c
... | ... | @@ -130,7 +130,7 @@ |
130 | 130 | *size = sig_addr - cert_addr; /* Subtract out the signature size */ |
131 | 131 | /* Subtract header if present */ |
132 | 132 | if (strncmp((char *)sig_addr, "CERT_ISW_", 9) == 0) |
133 | - *size = ((u32 *)*image)[HEADER_SIZE_OFFSET]; | |
133 | + *size -= ((u32 *)*image)[HEADER_SIZE_OFFSET]; | |
134 | 134 | cert_size = *size; |
135 | 135 | |
136 | 136 | /* Check if image load address is 32-bit aligned */ |