fix(esp_https_ota): Changed the type of erase size

Changed the type of erase size(esp_https_ota.c) from int to uint_32 type,
so that it do not overflow.
This commit is contained in:
hrushikesh.bhosale
2024-12-02 13:41:10 +05:30
parent 0163cb8ed0
commit 8d651e5e99

View File

@@ -556,7 +556,7 @@ esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle)
esp_err_t err;
int data_read;
const int erase_size = handle->bulk_flash_erase ? (handle->image_length > 0 ? handle->image_length : OTA_SIZE_UNKNOWN) : OTA_WITH_SEQUENTIAL_WRITES;
const size_t erase_size = handle->bulk_flash_erase ? (handle->image_length > 0 ? handle->image_length : OTA_SIZE_UNKNOWN) : OTA_WITH_SEQUENTIAL_WRITES;
switch (handle->state) {
case ESP_HTTPS_OTA_BEGIN:
err = esp_ota_begin(handle->partition.staging, erase_size, &handle->update_handle);