aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2016-12-08 01:09:44 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2016-12-08 07:09:22 -0500
commit678b5c6b22fed89a13d5b2267f423069a9b11c80 (patch)
tree033a4087eb17cd5ec1c164a0ae5e04b7bb030fee
parent48a992727d82cb7db076fa15d372178743b1f4cd (diff)
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 2fbf239bb1f2..e9c0993b131d 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,
420 unsigned int i, reqlen = GET_REQ_SIZE(tfm); 420 unsigned int i, reqlen = GET_REQ_SIZE(tfm);
421 int err = -ENOMEM; 421 int err = -ENOMEM;
422 unsigned long used; 422 unsigned long used;
423 size_t outlen; 423 size_t outlen = 0;
424 size_t usedpages = 0; 424 size_t usedpages = 0;
425 425
426 lock_sock(sk); 426 lock_sock(sk);