Skip to content

Commit

Permalink
Clear alpn_selected_len for clients, too
Browse files Browse the repository at this point in the history
Zero out the length alongside the NULLing of the pointer, to
bring parity between the selected and proposed fields..

Reviewed-by: Rich Salz <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
(Merged from openssl#2954)
  • Loading branch information
kaduk authored and levitte committed Mar 15, 2017
1 parent 1ae4c07 commit a5bb1aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssl/statem/extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a5bb1aa

Please sign in to comment.