Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH] crypto: algif_aead - fix uninitialized variable warning
@ 2016-12-08  6:09 Stephan Müller
  2016-12-08 12:17 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Stephan Müller @ 2016-12-08  6:09 UTC (permalink / raw)
  To: herbert; +Cc: Stephen Rothwell, linux-crypto

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>
---
 crypto/algif_aead.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index 2fbf239..e9c0993 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);
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-08 12:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08  6:09 [PATCH] crypto: algif_aead - fix uninitialized variable warning Stephan Müller
2016-12-08 12:17 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox