Skip to content

Commit bf37b8b

Browse files
Yossi LevyYossi Levy
authored andcommitted
When reading ROT from KVStore the return ROT key size was ignored
1 parent b895bf6 commit bf37b8b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

features/device_key/source/DeviceKey.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ int DeviceKey::generate_derived_key(const unsigned char *salt, size_t isalt_size
8787
{
8888
uint32_t key_buff[DEVICE_KEY_32BYTE / sizeof(uint32_t)];
8989
size_t actual_size = DEVICE_KEY_32BYTE;
90+
memset(key_buff, 0, DEVICE_KEY_32BYTE);
9091

9192
if (DEVICE_KEY_16BYTE != ikey_type && DEVICE_KEY_32BYTE != ikey_type) {
9293
return DEVICEKEY_INVALID_KEY_TYPE;

0 commit comments

Comments
 (0)