Avoid compiler complaining
authorPaul Yang <paulyang.inf@gmail.com>
Wed, 21 Jun 2017 16:31:26 +0000 (00:31 +0800)
committerRich Salz <rsalz@openssl.org>
Wed, 21 Jun 2017 18:36:02 +0000 (14:36 -0400)
initialize some local variables

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3741)

ssl/statem/extensions_clnt.c

index 846ee300918b916650dcde015248d13c23db03ce..0d1ca281f7b3e623cd5715a725c5a4d2ef51e60c 100644 (file)
@@ -790,11 +790,11 @@ EXT_RETURN tls_construct_ctos_psk(SSL *s, WPACKET *pkt, unsigned int context,
                                   X509 *x, size_t chainidx, int *al)
 {
 #ifndef OPENSSL_NO_TLS1_3
-    uint32_t now, agesec, agems;
-    size_t reshashsize, pskhashsize, binderoffset, msglen, idlen;
+    uint32_t now, agesec, agems = 0;
+    size_t reshashsize = 0, pskhashsize = 0, binderoffset, msglen, idlen = 0;
     unsigned char *resbinder = NULL, *pskbinder = NULL, *msgstart = NULL;
-    const unsigned char *id;
-    const EVP_MD *handmd = NULL, *mdres, *mdpsk;
+    const unsigned char *id = 0;
+    const EVP_MD *handmd = NULL, *mdres = NULL, *mdpsk = NULL;
     EXT_RETURN ret = EXT_RETURN_FAIL;
     SSL_SESSION *psksess = NULL;
     int dores = 0;