From a0d4ac0a992e51b2596a2c5110291364dfd37667 Mon Sep 17 00:00:00 2001 From: thivya-amazon <99231372+thivya-amazon@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:07:08 -0800 Subject: [PATCH] Update src/app/icd/ICDHandler.cpp Co-authored-by: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> --- src/app/icd/ICDHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);