From: Benjamin Kaduk Date: Wed, 15 Mar 2017 00:17:15 +0000 (-0500) Subject: Clear alpn_selected_len for clients, too X-Git-Tag: OpenSSL_1_1_1-pre1~2034 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a5bb1aa128dcadf7a026061b2804646f5fbaa72c;p=oweals%2Fopenssl.git Clear alpn_selected_len for clients, too Zero out the length alongside the NULLing of the pointer, to bring parity between the selected and proposed fields.. Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/2954) --- diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c index ffacd41cf9..0ab1f0494c 100644 --- a/ssl/statem/extensions.c +++ b/ssl/statem/extensions.c @@ -875,8 +875,8 @@ static int init_alpn(SSL *s, unsigned int context) { OPENSSL_free(s->s3->alpn_selected); s->s3->alpn_selected = NULL; + s->s3->alpn_selected_len = 0; if (s->server) { - s->s3->alpn_selected_len = 0; OPENSSL_free(s->s3->alpn_proposed); s->s3->alpn_proposed = NULL; s->s3->alpn_proposed_len = 0;