summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2016-12-08 07:09:44 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-12-08 20:09:22 +0800
commit336a64fc952cbf5d06a66daa30de4f3993725002 (patch)
treead7791ee6c84f9a7404e0268b67d0d47d10b2923
parentd4d21b6e0520cdfa428e805d452776a62f1b3a37 (diff)
downloadlinux-crypto-336a64fc952cbf5d06a66daa30de4f3993725002.tar.gz
linux-crypto-336a64fc952cbf5d06a66daa30de4f3993725002.zip
crypto: algif_aead - fix uninitialized variable warning
In case the user provided insufficient data, the code may return prematurely without any operation. In this case, the processed data indicated with outlen is zero. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/algif_aead.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index 2fbf239b..e9c0993b 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -420,7 +420,7 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg,
unsigned int i, reqlen = GET_REQ_SIZE(tfm);
int err = -ENOMEM;
unsigned long used;
- size_t outlen;
+ size_t outlen = 0;
size_t usedpages = 0;
lock_sock(sk);