Don't assume a decode error if session tlsext_ecpointformatlist is not NULL:
authorDr. Stephen Henson <steve@openssl.org>
Tue, 16 Nov 2010 22:41:07 +0000 (22:41 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 16 Nov 2010 22:41:07 +0000 (22:41 +0000)
it can be legitimately set elsewhere.

ssl/t1_lib.c

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