Initialise the al variable
authorMatt Caswell <matt@openssl.org>
Mon, 2 Jan 2017 11:16:37 +0000 (11:16 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 6 Jan 2017 10:25:13 +0000 (10:25 +0000)
al can be used uninitialised in an error path.

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

ssl/statem/statem_clnt.c

index 98e19b50ba93a73bd1a3eb2b4d64492d922dddc7..84dcf08bd46c1c50038549b63b9636a3802785cb 100644 (file)
@@ -3012,7 +3012,7 @@ WORK_STATE tls_prepare_client_certificate(SSL *s, WORK_STATE wst)
 
 int tls_construct_client_certificate(SSL *s, WPACKET *pkt)
 {
-    int al;
+    int al = SSL_AD_INTERNAL_ERROR;
 
     /*
      * TODO(TLS1.3): For now we must put an empty context. Needs to be filled in