From add4b5674467db7e96f9c8ebf98fba604116e394 Mon Sep 17 00:00:00 2001 From: Arun Padakanti Date: Mon, 24 Mar 2025 11:04:30 +0530 Subject: [PATCH] Fixed length comparision while returning the details of current network --- src/platform/silabs/NetworkCommissioningWiFiDriver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp index c51d213cfb..0f207e8f94 100644 --- a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp @@ -330,7 +330,7 @@ CHIP_ERROR GetConnectedNetwork(Network & network) VerifyOrReturnError(wfx_is_sta_connected(), CHIP_ERROR_NOT_CONNECTED); network.connected = true; uint8_t length = strnlen(wifiConfig.ssid, DeviceLayer::Internal::kMaxWiFiSSIDLength); - VerifyOrReturnError(length < sizeof(network.networkID), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(length <= sizeof(network.networkID), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(network.networkID, wifiConfig.ssid, length); network.networkIDLen = length;