Skip to content

Commit c54d145

Browse files
committed
rimage: manifest: Fix image size calculation in resign_image function
Subtract the number of skipped bytes from the file size to avoid going beyond of memory buffer. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent f467f56 commit c54d145

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/rimage/src/manifest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ int resign_image(struct image *image)
17301730
goto out;
17311731
}
17321732

1733-
image->image_end = size;
1733+
image->image_end = size - i;
17341734

17351735
/* check that key size matches */
17361736
if (image->adsp->man_v2_5 || image->adsp->man_ace_v1_5) {

0 commit comments

Comments
 (0)