[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Apr 26 16:41:45 UTC 2017


The branch master has been updated
       via  e596c68c315dc896458cd2a97ab62ec88e144e0b (commit)
      from  8ed9a26616a7101ea698c189fbbb663186676075 (commit)


- Log -----------------------------------------------------------------
commit e596c68c315dc896458cd2a97ab62ec88e144e0b
Author: Graham Edgecombe <gpe at grahamedgecombe.com>
Date:   Tue Apr 25 19:36:10 2017 +0100

    Return success in custom_ext_parse_old_cb_wrap if parse_cb is NULL
    
    This fixes a segfault if a NULL parse_cb is passed to
    SSL_CTX_add_{client,server}_custom_ext, which was supported in the
    pre-1.1.1 implementation.
    
    This behaviour is consistent with the other custom_ext_*_old_cb_wrap
    functions, and with the new SSL_CTX_add_custom_ext function.
    
    CLA: trivial
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3310)

-----------------------------------------------------------------------

Summary of changes:
 ssl/statem/extensions_cust.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ssl/statem/extensions_cust.c b/ssl/statem/extensions_cust.c
index 3188ade..6de59e2 100644
--- a/ssl/statem/extensions_cust.c
+++ b/ssl/statem/extensions_cust.c
@@ -64,6 +64,9 @@ static int custom_ext_parse_old_cb_wrap(SSL *s, unsigned int ext_type,
     custom_ext_parse_cb_wrap *parse_cb_wrap =
         (custom_ext_parse_cb_wrap *)parse_arg;
 
+    if (parse_cb_wrap->parse_cb == NULL)
+        return 1;
+
     return parse_cb_wrap->parse_cb(s, ext_type, in, inlen, al,
                                    parse_cb_wrap->parse_arg);
 }


More information about the openssl-commits mailing list