Skip to content

Commit c0bf271

Browse files
committed
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.
1 parent 41c72ea commit c0bf271

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/luks2/luks2_reencrypt_digest.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static size_t reenc_keyslot_serialize(struct luks2_hdr *hdr, uint8_t *buffer)
243243
static size_t blob_serialize(void *blob, size_t length, uint8_t *buffer)
244244
{
245245
if (buffer)
246-
memcpy(buffer, blob, length);
246+
crypt_safe_memcpy(buffer, blob, length);
247247

248248
return length;
249249
}

0 commit comments

Comments
 (0)