Skip to content

Commit 367d6f5

Browse files
authored
[SL-TEMP] Fixed length comparision while returning the details of current network (#367)
1 parent 529e934 commit 367d6f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/platform/silabs/NetworkCommissioningWiFiDriver.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ CHIP_ERROR GetConnectedNetwork(Network & network)
330330
VerifyOrReturnError(wfx_is_sta_connected(), CHIP_ERROR_NOT_CONNECTED);
331331
network.connected = true;
332332
uint8_t length = strnlen(wifiConfig.ssid, DeviceLayer::Internal::kMaxWiFiSSIDLength);
333-
VerifyOrReturnError(length < sizeof(network.networkID), CHIP_ERROR_BUFFER_TOO_SMALL);
333+
VerifyOrReturnError(length <= sizeof(network.networkID), CHIP_ERROR_BUFFER_TOO_SMALL);
334334
memcpy(network.networkID, wifiConfig.ssid, length);
335335
network.networkIDLen = length;
336336

0 commit comments

Comments
 (0)