From: Antonio Quartulli Date: Sun, 10 Nov 2019 13:35:23 +0000 (+0100) Subject: auth_token_kt: ensure key_type object is initialized X-Git-Tag: v2.5_beta1~241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d0b95c45130af2f91fa2195c483e2c7461c0f40;p=thirdparty%2Fopenvpn.git auth_token_kt: ensure key_type object is initialized 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 Signed-off-by: Antonio Quartulli Acked-by: Arne Schwabe 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 --- diff --git a/src/openvpn/auth_token.c b/src/openvpn/auth_token.c index 1edc80699..6275299df 100644 --- a/src/openvpn/auth_token.c +++ b/src/openvpn/auth_token.c @@ -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");