From: Stephan Mueller Date: Thu, 8 Dec 2016 06:09:44 +0000 (+0100) Subject: crypto: algif_aead - fix uninitialized variable warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=678b5c6b22fed89a13d5b2267f423069a9b11c80;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu --- 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, 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);