Commit 92f14d28 authored by Milan Broz's avatar Milan Broz

Fix null dereference in previous commit.

parent 954214e4
......@@ -276,7 +276,7 @@ int INTEGRITY_format(struct crypt_device *cd,
return r;
/* There is no data area, we can actually use fake zeroed key */
if (params->integrity_key_size)
if (params && params->integrity_key_size)
dmdi.u.integrity.vk = crypt_alloc_volume_key(params->integrity_key_size, NULL);
r = dm_create_device(cd, tmp_name, "INTEGRITY", &dmdi, 0);
......
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