Skip to content

Commit 250cd2f

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 8b4c70a commit 250cd2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/imgtool/dumpinfo.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def dump_imginfo(imgfile, outfile=None, silent=False):
9999
while tlv_off < tlv_end:
100100
tlv_type, tlv_len = struct.unpack(
101101
'HH',
102-
b[tlv_off:(tlv_off + image.TLV_INFO_SIZE)])
103-
tlv_off += image.TLV_INFO_SIZE
102+
b[tlv_off:(tlv_off + image.TLV_SIZE)])
103+
tlv_off += image.TLV_SIZE
104104
tlv_data = b[tlv_off:(tlv_off + tlv_len)]
105105
tlv_area["tlvs_prot"].append(
106106
{"type": tlv_type, "len": tlv_len, "data": tlv_data})
@@ -117,8 +117,8 @@ def dump_imginfo(imgfile, outfile=None, silent=False):
117117
while tlv_off < tlv_end:
118118
tlv_type, tlv_len = struct.unpack(
119119
'HH',
120-
b[tlv_off:(tlv_off + image.TLV_INFO_SIZE)])
121-
tlv_off += image.TLV_INFO_SIZE
120+
b[tlv_off:(tlv_off + image.TLV_SIZE)])
121+
tlv_off += image.TLV_SIZE
122122
tlv_data = b[tlv_off:(tlv_off + tlv_len)]
123123
tlv_area["tlvs"].append(
124124
{"type": tlv_type, "len": tlv_len, "data": tlv_data})

0 commit comments

Comments
 (0)