[commissioner] fix provisioning URL comparison (#8411)

This commit fixes the comparison of the received Provisioning URL
string with the commissioner's one when handling Joiner Finalize TMF
message.
This commit is contained in:
Abtin Keshavarzian
2022-11-17 19:45:37 -08:00
committed by GitHub
parent 439a5ba234
commit 4e83caf42d
+1 -1
View File
@@ -1045,7 +1045,7 @@ void Commissioner::HandleTmf<kUriJoinerFinalize>(Coap::Message &aMessage, const
uint8_t len = static_cast<uint8_t>(StringLength(mProvisioningUrl, sizeof(mProvisioningUrl)));
if ((provisioningUrl.GetProvisioningUrlLength() != len) ||
!memcmp(provisioningUrl.GetProvisioningUrl(), mProvisioningUrl, len))
(memcmp(provisioningUrl.GetProvisioningUrl(), mProvisioningUrl, len) != 0))
{
state = StateTlv::kReject;
}