mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Use crypt_safe_memcpy for operations with key.
This commit is contained in:
@@ -2045,7 +2045,7 @@ static int _dm_target_query_crypt(struct crypt_device *cd, uint32_t get_flags,
|
||||
} else {
|
||||
buffer[2] = '\0';
|
||||
for(i = 0; i < vk->keylength; i++) {
|
||||
memcpy(buffer, &key_[i * 2], 2);
|
||||
crypt_safe_memcpy(buffer, &key_[i * 2], 2);
|
||||
vk->key[i] = strtoul(buffer, &endp, 16);
|
||||
if (endp != &buffer[2]) {
|
||||
r = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user