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 <[email protected]> Signed-off-by: Stephan Mueller <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 48a9927 commit 678b5c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)