mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-28 23:23:30 +08:00
arm: mach-keystone: Modify secure image size before copy
The size of the secure image does not include the size of the header, subtract this out before we move the image or we grab extra data after the image. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
This commit is contained in:
parent
7bdc6947d2
commit
9e58d4dbe3
@ -114,12 +114,12 @@ void board_fit_image_post_process(void **p_image, size_t *p_size)
|
||||
}
|
||||
|
||||
/*
|
||||
* Overwrite the image headers after authentication
|
||||
* and decryption. Update size to reflect removal
|
||||
* of header.
|
||||
*/
|
||||
memcpy(image, image + KS2_HS_SEC_HEADER_LEN, *p_size);
|
||||
* Overwrite the image headers after authentication
|
||||
* and decryption. Update size to reflect removal
|
||||
* of header.
|
||||
*/
|
||||
*p_size -= KS2_HS_SEC_HEADER_LEN;
|
||||
memcpy(image, image + KS2_HS_SEC_HEADER_LEN, *p_size);
|
||||
|
||||
/*
|
||||
* Output notification of successful authentication to re-assure the
|
||||
|
Loading…
Reference in New Issue
Block a user