Skip to content

Commit 7f7d0af

Browse files
committed
Merge branch 'fix/esp_tee_coverity_issues' into 'master'
fix(esp_tee): Fix coverity issue from the `attestation` component Closes IDF-12867 See merge request espressif/esp-idf!40054
2 parents 01e990e + 9b1aaa2 commit 7f7d0af

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

components/esp_tee/subproject/components/attestation/esp_att_utils_part_info.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ static esp_err_t get_part_digest(const esp_partition_pos_t *pos, esp_att_part_di
272272

273273
part_digest->type = ESP_ATT_DIGEST_TYPE_SHA256;
274274
size_t digest_len = digest_type_to_len(part_digest->type);
275+
276+
if (metadata.image_len < digest_len) {
277+
return ESP_ERR_INVALID_SIZE;
278+
}
275279
size_t image_len = metadata.image_len - digest_len;
276280

277281
uint8_t *digest = calloc(digest_len, sizeof(uint8_t));

components/esp_tee/test_apps/tee_test_fw/pytest_esp_tee_ut.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
CONFIG_OTA = [
2323
# 'config, target, skip_autoflash, markers',
24-
('ota', target, 'y', (pytest.mark.host_test,))
24+
('ota', target, 'y', (pytest.mark.generic,))
2525
for target in SUPPORTED_TARGETS
2626
]
2727

0 commit comments

Comments
 (0)