Skip to content

Commit bada5d1

Browse files
committed
mgmt: mcumgr: grp: img_mgmt: increment data_off after reading the SHA
Fix a bug where the image's SHA would be interpreted as TLV headers due to missing a data_off increment. Signed-off-by: Stuart Alldritt <[email protected]>
1 parent ec3bcd3 commit bada5d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ int img_mgmt_read_info(int image_slot, struct image_version *ver, uint8_t *hash,
345345
return rc;
346346
}
347347
}
348+
data_off += IMAGE_SHA_LEN;
348349
}
349350

350351
if (!hash_found) {

0 commit comments

Comments
 (0)