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:
Ondrej Kozina
2024-09-12 11:08:11 +02:00
parent 41c72eaa65
commit c0bf271bef

View File

@@ -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)
{
if (buffer)
memcpy(buffer, blob, length);
crypt_safe_memcpy(buffer, blob, length);
return length;
}