diff --git a/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp b/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp index 2081a9eaadc5b6..8f09ee5f595865 100644 --- a/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningWiFiDriver.cpp @@ -161,7 +161,8 @@ void ESPWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callbac VerifyOrExit(NetworkMatch(mStagingNetwork, networkId), networkingStatus = Status::kNetworkIDNotFound); VerifyOrExit(mpConnectCallback == nullptr, networkingStatus = Status::kUnknownError); - ChipLogProgress(NetworkProvisioning, "ESP NetworkCommissioningDelegate: SSID: %s", networkId.data()); + ChipLogProgress(NetworkProvisioning, "ESP NetworkCommissioningDelegate: SSID: %.*s", static_cast(networkId.size()), + networkId.data()); err = ConnectWiFiNetwork(reinterpret_cast(mStagingNetwork.ssid), mStagingNetwork.ssidLen, reinterpret_cast(mStagingNetwork.credentials), mStagingNetwork.credentialsLen);