mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
crypto: omap-des - handle NULL cipher request
If no data is provided for DES request, just return immediately. No processing is needed in this case. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
96846223ac
commit
aca8bf0027
@ -637,6 +637,9 @@ static int omap_des_crypt(struct skcipher_request *req, unsigned long mode)
|
||||
!!(mode & FLAGS_ENCRYPT),
|
||||
!!(mode & FLAGS_CBC));
|
||||
|
||||
if (!req->cryptlen)
|
||||
return 0;
|
||||
|
||||
if (!IS_ALIGNED(req->cryptlen, DES_BLOCK_SIZE))
|
||||
return -EINVAL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user