ensure string is null terminated

This commit is contained in:
Grant Limberg 2023-01-19 11:08:25 -08:00
commit 1ef04a18c3
No known key found for this signature in database
GPG key ID: 8F2F97D3BE8D7735

View file

@ -429,6 +429,7 @@ bool NetworkConfig::fromDictionary(const Dictionary<ZT_NETWORKCONFIG_DICT_CAPACI
this->ssoProvider[sizeof(this->ssoProvider) - 1] = 0; this->ssoProvider[sizeof(this->ssoProvider) - 1] = 0;
} else { } else {
strncpy(this->ssoProvider, "default", sizeof(this->ssoProvider)); strncpy(this->ssoProvider, "default", sizeof(this->ssoProvider));
this->ssoProvider[sizeof(this->ssoProvider) - 1] = 0;
} }
} else { } else {
this->authenticationURL[0] = 0; this->authenticationURL[0] = 0;