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

pull/12276/head
Xu Si Yu 2023-09-12 10:45:20 +08:00
rodzic ea840fa459
commit 4a941b96b8
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