Skip to content
Commit 0cf1a136 authored by Roman Azarenko's avatar Roman Azarenko Committed by Tom Rini
Browse files

tools: ensure zeroed padding in external FIT images



Padding the header of an external FIT image is achieved by truncating
the existing temporary FIT file to match the required alignment before
appending image data. Reusing an existing file this way means that the
padding will likely contain a portion of the original data not
overwritten by the new header.

Zero out any data past the end of the new header, and stop at either
the end of the desired padding, or the end of the old FIT file,
whichever comes first.

Fixes: 7946a814 ("Revert "mkimage: fit: Do not tail-pad fitImage with external data"")
Signed-off-by: default avatarRoman Azarenko <roman.azarenko@iopsys.eu>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 6442434d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment