Skip to content

Commit

Permalink
crypto: algif_aead - fix uninitialized variable warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
smuellerDD authored and herbertx committed Dec 8, 2016
1 parent 48a9927 commit 678b5c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/algif_aead.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 678b5c6

Please sign in to comment.