Skip to content

Commit 17b56a0

Browse files
GeorgeCGVnordicjm
authored andcommitted
imgtool: fix verify tlv offset before main scan
Correct tlv_off by accounting for protected TLVs found before main scan. Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
1 parent cfd876f commit 17b56a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/imgtool/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ def verify(imgfile, key):
843843
tlv_off += TLV_SIZE + tlv_len
844844

845845
digest = None
846-
tlv_off = header_size + img_size
846+
tlv_off = prot_tlv_size
847847
tlv_end = tlv_off + tlv_tot
848848
tlv_off += TLV_INFO_SIZE # skip tlv info
849849
while tlv_off < tlv_end:

0 commit comments

Comments
 (0)