From: Matt Caswell Date: Fri, 20 Jan 2017 13:53:38 +0000 (+0000) Subject: Ensure the al variable is properly ininitialised in all code paths X-Git-Tag: OpenSSL_1_1_1-pre1~2551 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6df55cac1a2c4441a70d15875ab22530251509ce;p=oweals%2Fopenssl.git Ensure the al variable is properly ininitialised in all code paths Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2259) --- diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index cd871940ee..53e16f87ef 100644 --- a/ssl/statem/statem_clnt.c +++ b/ssl/statem/statem_clnt.c @@ -2210,7 +2210,7 @@ static int ca_dn_cmp(const X509_NAME *const *a, const X509_NAME *const *b) MSG_PROCESS_RETURN tls_process_new_session_ticket(SSL *s, PACKET *pkt) { - int al; + int al = SSL_AD_DECODE_ERROR; unsigned int ticklen; unsigned long ticket_lifetime_hint, age_add = 0; unsigned int sess_len; @@ -2222,7 +2222,6 @@ MSG_PROCESS_RETURN tls_process_new_session_ticket(SSL *s, PACKET *pkt) || (!SSL_IS_TLS13(s) && PACKET_remaining(pkt) != ticklen) || (SSL_IS_TLS13(s) && (ticklen == 0 || PACKET_remaining(pkt) < ticklen))) { - al = SSL_AD_DECODE_ERROR; SSLerr(SSL_F_TLS_PROCESS_NEW_SESSION_TICKET, SSL_R_LENGTH_MISMATCH); goto f_err; }