Don't assume a decode error if session tlsext_ecpointformatlist is not NULL: it can be legitimately set elsewhere.

This commit is contained in:
Dr. Stephen Henson 2010-11-17 17:37:23 +00:00
parent 732d31beee
commit 7d5686d355

View File

@ -816,8 +816,8 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in
{ {
if(s->session->tlsext_ecpointformatlist) if(s->session->tlsext_ecpointformatlist)
{ {
*al = TLS1_AD_DECODE_ERROR; OPENSSL_free(s->session->tlsext_ecpointformatlist);
return 0; s->session->tlsext_ecpointformatlist = NULL;
} }
s->session->tlsext_ecpointformatlist_length = 0; s->session->tlsext_ecpointformatlist_length = 0;
if ((s->session->tlsext_ecpointformatlist = OPENSSL_malloc(ecpointformatlist_length)) == NULL) if ((s->session->tlsext_ecpointformatlist = OPENSSL_malloc(ecpointformatlist_length)) == NULL)