System/Security: wrong check of the Memprot feature in esp_restart()/panic_restart()

esp_restart()/panic_restart() never resets the Digital system (so far required only by the Memprot feature) as there's a typo in the corresponding #define:
it checks CONFIG_ESP_SYSTEM_CONFIG_MEMPROT_FEATURE instead of CONFIG_ESP_SYSTEM_MEMPROT_FEATURE.
Issue fixed.

IDF-4094
This commit is contained in:
Martin Vychodil 2021-10-05 11:58:31 +02:00
parent 86b7acc932
commit ec6745a137
2 changed files with 2 additions and 2 deletions

View File

@ -228,7 +228,7 @@ void __attribute__((noreturn)) panic_restart(void)
digital_reset_needed = true;
}
#endif
#if CONFIG_ESP_SYSTEM_CONFIG_MEMPROT_FEATURE
#if CONFIG_ESP_SYSTEM_MEMPROT_FEATURE
if (esp_memprot_is_intr_ena_any() || esp_memprot_is_locked_any()) {
digital_reset_needed = true;
}

View File

@ -76,7 +76,7 @@ void IRAM_ATTR esp_restart(void)
vTaskSuspendAll();
bool digital_reset_needed = false;
#if CONFIG_ESP_SYSTEM_CONFIG_MEMPROT_FEATURE
#if CONFIG_ESP_SYSTEM_MEMPROT_FEATURE
if (esp_memprot_is_intr_ena_any() || esp_memprot_is_locked_any()) {
digital_reset_needed = true;
}