Skip to content

Commit ec26273

Browse files
rbrscolemande-nordic
authored andcommitted
bootutil: fix null pointer dereference in logging.
`bootutil_tlv_iter_next()` may be called with `type == NULL`. Signed-off-by: Samuel Coleman <samuel.coleman@rbr-global.com>
1 parent f6e1af8 commit ec26273

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boot/bootutil/src/tlv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ bootutil_tlv_iter_next(struct image_tlv_iter *it, uint32_t *off, uint16_t *len,
142142
*len = tlv.it_len;
143143
it->tlv_off += sizeof(tlv) + tlv.it_len;
144144
BOOT_LOG_DBG("bootutil_tlv_iter_next: TLV %d found at %d (size %d)",
145-
*type, *off, *len);
145+
tlv.it_type, *off, *len);
146146
return 0;
147147
}
148148

0 commit comments

Comments
 (0)