From 73edd710eb283551300d68c52f7742b2029f6a7c Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Wed, 26 Jan 2022 20:07:12 -0800 Subject: [PATCH] Update src/credentials/GroupDataProviderImpl.h Co-authored-by: Boris Zbarsky --- src/credentials/GroupDataProviderImpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/credentials/GroupDataProviderImpl.h b/src/credentials/GroupDataProviderImpl.h index 744f159eb71637..6c7e332402c7e8 100644 --- a/src/credentials/GroupDataProviderImpl.h +++ b/src/credentials/GroupDataProviderImpl.h @@ -153,7 +153,7 @@ class GroupDataProviderImpl : public GroupDataProvider void SetKey(const ByteSpan & key, uint16_t hash) { mKeyHash = hash; - memcpy(mKeyValue, key.data(), std::min(key.size(), Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES)); + memcpy(mKeyValue, key.data(), std::min(key.size(), sizeof(mKeyValue)); } uint16_t GetKeyHash() override { return mKeyHash; }