fix(openthread): copy the networkname with a null terminator

pull/12369/head
Xu Si Yu 2023-09-12 10:45:20 +08:00
rodzic 35535a6b6e
commit d5f3f73f51
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -112,7 +112,7 @@ esp_err_t esp_openthread_auto_start(otOperationalDatasetTlvs *datasetTlvs)
dataset.mComponents.mIsPanIdPresent = true;
len = strlen(CONFIG_OPENTHREAD_NETWORK_NAME);
assert(len <= OT_NETWORK_NAME_MAX_SIZE);
memcpy(dataset.mNetworkName.m8, CONFIG_OPENTHREAD_NETWORK_NAME, len);
memcpy(dataset.mNetworkName.m8, CONFIG_OPENTHREAD_NETWORK_NAME, len + 1);
dataset.mComponents.mIsNetworkNamePresent = true;
// Extended Pan ID