Require params for crypt_load & TCRYPT type.
authorMilan Broz <gmazyland@gmail.com>
Sat, 8 Dec 2012 00:31:38 +0000 (01:31 +0100)
committerMilan Broz <gmazyland@gmail.com>
Sat, 8 Dec 2012 00:31:38 +0000 (01:31 +0100)
lib/setup.c

index cf4d260..fd65e8f 100644 (file)
@@ -636,6 +636,9 @@ static int _crypt_load_tcrypt(struct crypt_device *cd, struct crypt_params_tcryp
 {
        int r;
 
+       if (!params)
+               return -EINVAL;
+
        r = init_crypto(cd);
        if (r < 0)
                return r;