mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-18 11:33:17 +03:00
nvs_set_str() passed a caller-supplied value straight to NVSHandleSimple::set_string(), which computed strlen(value) + 1. A NULL value therefore crashed, and the debug log formatted it with %s. Reject a NULL value with ESP_ERR_INVALID_ARG in both the C API (before the log) and set_string() (before strlen), so the C++ handle API is covered too.