Merge branch 'bugfix/espcoredump_fix_error_reported_for_blank_partition' into 'master'
espcoredump: fix error reported for blank partition Closes IDF-1727 See merge request espressif/esp-idf!8801
This commit is contained in:
commit
3ffacb04b9
1 changed files with 4 additions and 1 deletions
|
@ -301,7 +301,10 @@ esp_err_t esp_core_dump_image_get(size_t* out_addr, size_t *out_size)
|
|||
uint32_t *dw = (uint32_t *)core_data;
|
||||
*out_size = *dw;
|
||||
spi_flash_munmap(core_data_handle);
|
||||
if ((*out_size < sizeof(uint32_t)) || (*out_size > core_part->size)) {
|
||||
if (*out_size == 0xFFFFFFFF) {
|
||||
ESP_LOGD(TAG, "Blank core dump partition!");
|
||||
return ESP_ERR_INVALID_SIZE;
|
||||
} else if ((*out_size < sizeof(uint32_t)) || (*out_size > core_part->size)) {
|
||||
ESP_LOGE(TAG, "Incorrect size of core dump image: %d", *out_size);
|
||||
return ESP_ERR_INVALID_SIZE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue