diff --git a/src/app/icd/ICDHandler.cpp b/src/app/icd/ICDHandler.cpp index 9516752f1d6653..d71a640526f5b6 100644 --- a/src/app/icd/ICDHandler.cpp +++ b/src/app/icd/ICDHandler.cpp @@ -79,7 +79,7 @@ CHIP_ERROR CheckInMessageHandler::OnMessageReceived(Messaging::ExchangeContext * Crypto::Aes128KeyHandle key; chip::Protocols::SecureChannel::CounterType counter; MutableByteSpan appData; - uint8_t checkInPayload[chip::Protocols::SecureChannel::CheckinMessage::sMinPayloadSize]; + ByteSpan payloadByteSpan{ payload->Start(), payload->DataLength() }; memcpy(&checkInPayload, payload->Start(), sizeof(checkInPayload)); chip::ByteSpan payloadByteSpan(checkInPayload); chip::Protocols::SecureChannel::CheckinMessage::ParseCheckinMessagePayload(key, payloadByteSpan, counter, appData);