Test passed resilience parameter is not NULL.

This commit is contained in:
Ondrej Kozina
2022-05-06 13:20:04 +02:00
committed by Milan Broz
parent 2820626f5e
commit d9eff7ffd7

View File

@@ -2416,7 +2416,7 @@ static int reencrypt_init(struct crypt_device *cd,
.flags = CRYPT_ACTIVATE_SHARED /* turn off exclusive open checks */
};
if (!params || params->mode > CRYPT_REENCRYPT_DECRYPT)
if (!params || !params->resilience || params->mode > CRYPT_REENCRYPT_DECRYPT)
return -EINVAL;
if (params->mode != CRYPT_REENCRYPT_DECRYPT &&