Commit af2730fe authored by Milan Broz's avatar Milan Broz

Always zero memory in crypt_safe_alloc.

parent a6d64d1d
......@@ -1125,7 +1125,6 @@ int dm_resume_and_reinstate_key(struct crypt_device *cd, const char *name,
goto out;
}
memset(msg, 0, msg_size);
strcpy(msg, "key set ");
hex_key(&msg[8], key_size, key);
......
......@@ -92,6 +92,7 @@ void *crypt_safe_alloc(size_t size)
return NULL;
alloc->size = size;
memset(&alloc->data, 0, size);
return &alloc->data;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment