]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
auth_token_kt: ensure key_type object is initialized
authorAntonio Quartulli <a@unstable.cc>
Sun, 10 Nov 2019 13:35:23 +0000 (14:35 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 10 Nov 2019 16:51:57 +0000 (17:51 +0100)
Fixes the following warning:

auth_token.c: In function 'auth_token_init_secret':
auth_token.c:47: warning: 'kt.cipher_length' is used uninitialized in this
function
auth_token.c:34: note: 'kt.cipher_length' was declared here

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20191110133525.6069-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19092.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/auth_token.c

index 1edc8069974459335e8be14f3fc023f366404c0a..6275299df8e459f66f92772344f154cd6c81196c 100644 (file)
@@ -31,7 +31,7 @@ const char *auth_token_pem_name = "OpenVPN auth-token server key";
 static struct key_type
 auth_token_kt(void)
 {
-    struct key_type kt;
+    struct key_type kt = { 0 };
     /* We do not encrypt our session tokens */
     kt.cipher = NULL;
     kt.digest = md_kt_get("SHA256");