Skip to content

Commit 678b5c6

Browse files
smuellerDDherbertx
authored andcommitted
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>
1 parent 48a9927 commit 678b5c6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crypto/algif_aead.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg,
420420
unsigned int i, reqlen = GET_REQ_SIZE(tfm);
421421
int err = -ENOMEM;
422422
unsigned long used;
423-
size_t outlen;
423+
size_t outlen = 0;
424424
size_t usedpages = 0;
425425

426426
lock_sock(sk);

0 commit comments

Comments
 (0)