Skip to content

Commit 183b27e

Browse files
committed
imgtool: dumpinfo.py: use correct define when tlv iterating
When iterating over tlv's the `TLV_SIZE` should be used and not `TLV_INFO_SIZE`. Signed-off-by: Bram Vlerick <[email protected]>
1 parent 6fe259b commit 183b27e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/imgtool/dumpinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def dump_imginfo(imgfile, outfile=None, silent=False):
168168
tlv_type, tlv_len = struct.unpack(
169169
'HH',
170170
b[tlv_off:(tlv_off + image.TLV_INFO_SIZE)])
171-
tlv_off += image.TLV_INFO_SIZE
171+
tlv_off += image.TLV_SIZE
172172
tlv_data = b[tlv_off:(tlv_off + tlv_len)]
173173
tlv_area["tlvs_prot"].append(
174174
{"type": tlv_type, "len": tlv_len, "data": tlv_data})
@@ -186,7 +186,7 @@ def dump_imginfo(imgfile, outfile=None, silent=False):
186186
tlv_type, tlv_len = struct.unpack(
187187
'HH',
188188
b[tlv_off:(tlv_off + image.TLV_INFO_SIZE)])
189-
tlv_off += image.TLV_INFO_SIZE
189+
tlv_off += image.TLV_SIZE
190190
tlv_data = b[tlv_off:(tlv_off + tlv_len)]
191191
tlv_area["tlvs"].append(
192192
{"type": tlv_type, "len": tlv_len, "data": tlv_data})

0 commit comments

Comments
 (0)