diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index ea94fed4763e47..109bbc69abbb39 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -534,7 +534,7 @@ void DiscoveryImplPlatform::HandleNodeResolve(void * context, DnssdService * res CHIP_ERROR DiscoveryImplPlatform::FindCommissionableNodes(DiscoveryFilter filter) { ReturnErrorOnFailure(InitImpl()); - char serviceName[kMaxCommisisonableServiceNameSize]; + char serviceName[kMaxCommissionableServiceNameSize]; ReturnErrorOnFailure(MakeServiceTypeName(serviceName, sizeof(serviceName), filter, DiscoveryType::kCommissionableNode)); return ChipDnssdBrowse(serviceName, DnssdServiceProtocol::kDnssdProtocolUdp, Inet::IPAddressType::kAny, @@ -544,7 +544,7 @@ CHIP_ERROR DiscoveryImplPlatform::FindCommissionableNodes(DiscoveryFilter filter CHIP_ERROR DiscoveryImplPlatform::FindCommissioners(DiscoveryFilter filter) { ReturnErrorOnFailure(InitImpl()); - char serviceName[kMaxCommisisonerServiceNameSize]; + char serviceName[kMaxCommissionerServiceNameSize]; ReturnErrorOnFailure(MakeServiceTypeName(serviceName, sizeof(serviceName), filter, DiscoveryType::kCommissionerNode)); return ChipDnssdBrowse(serviceName, DnssdServiceProtocol::kDnssdProtocolUdp, Inet::IPAddressType::kAny, diff --git a/src/lib/dnssd/ServiceNaming.h b/src/lib/dnssd/ServiceNaming.h index 1c8f9e62c91d60..10e5abba465774 100644 --- a/src/lib/dnssd/ServiceNaming.h +++ b/src/lib/dnssd/ServiceNaming.h @@ -37,11 +37,11 @@ constexpr char kCommissionProtocol[] = "_udp"; constexpr char kLocalDomain[] = "local"; // each includes space for a null terminator, which becomes a . when the names are appended. -constexpr size_t kMaxCommisisonableServiceNameSize = +constexpr size_t kMaxCommissionableServiceNameSize = Common::kSubTypeMaxLength + 1 + sizeof(kSubtypeServiceNamePart) + sizeof(kCommissionableServiceName); // each includes space for a null terminator, which becomes a . when the names are appended. -constexpr size_t kMaxCommisisonerServiceNameSize = +constexpr size_t kMaxCommissionerServiceNameSize = Common::kSubTypeMaxLength + 1 + sizeof(kSubtypeServiceNamePart) + sizeof(kCommissionerServiceName); // + 1 for nullchar on prefix.