mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
Add crypt_safe_memcpy in reencrypt digest routine.
We copy volume keys for purpose of calculating LUKS2 reencryption digest. Add crypt_safe_memcpy in serialization function as well.
This commit is contained in:
@@ -243,7 +243,7 @@ static size_t reenc_keyslot_serialize(struct luks2_hdr *hdr, uint8_t *buffer)
|
|||||||
static size_t blob_serialize(void *blob, size_t length, uint8_t *buffer)
|
static size_t blob_serialize(void *blob, size_t length, uint8_t *buffer)
|
||||||
{
|
{
|
||||||
if (buffer)
|
if (buffer)
|
||||||
memcpy(buffer, blob, length);
|
crypt_safe_memcpy(buffer, blob, length);
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user