|
|
@@ -585,6 +585,9 @@ static int xts_aes_encrypt(struct blkcipher_desc *desc,
|
|
|
struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
|
|
|
struct blkcipher_walk walk;
|
|
|
|
|
|
+ if (!nbytes)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
if (unlikely(!xts_ctx->fc))
|
|
|
return xts_fallback_encrypt(desc, dst, src, nbytes);
|
|
|
|
|
|
@@ -599,6 +602,9 @@ static int xts_aes_decrypt(struct blkcipher_desc *desc,
|
|
|
struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
|
|
|
struct blkcipher_walk walk;
|
|
|
|
|
|
+ if (!nbytes)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
if (unlikely(!xts_ctx->fc))
|
|
|
return xts_fallback_decrypt(desc, dst, src, nbytes);
|
|
|
|