driver: fix issue found by coverity scan

This commit is contained in:
morris
2022-03-14 22:49:18 +08:00
parent 38090a0248
commit de662b987e
6 changed files with 23 additions and 30 deletions

View File

@@ -789,7 +789,7 @@ static esp_err_t process_checksum(bootloader_sha256_handle_t sha_handle, uint32_
length = length - unpadded_length;
// Verify checksum
WORD_ALIGNED_ATTR uint8_t buf[16];
WORD_ALIGNED_ATTR uint8_t buf[16] = {0};
if (!skip_check_checksum || sha_handle != NULL) {
CHECK_ERR(bootloader_flash_read(data->start_addr + unpadded_length, buf, length, true));
}