[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Thu Mar 10 01:45:22 UTC 2016


The branch master has been updated
       via  dca7158c954679757e216a0179f9014f86f6ed44 (commit)
      from  642565106e7764cecf96cf865bd6c52afaa68f22 (commit)


- Log -----------------------------------------------------------------
commit dca7158c954679757e216a0179f9014f86f6ed44
Author: Jim Basney <jbasney at illinois.edu>
Date:   Wed Mar 9 17:11:49 2016 -0600

    Avoid double-free in calleres to OCSP_parse_url
    
    set pointers to NULL after OPENSSL_free before returning to caller to
    avoid possible double-free in caller
    
    Signed-off-by: Rich Salz <rsalz at akamai.com>
    Reviewed-by: Richard Levitte <levitte at openssl.org>

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

Summary of changes:
 crypto/ocsp/ocsp_lib.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c
index 1aaa290..8814190 100644
--- a/crypto/ocsp/ocsp_lib.c
+++ b/crypto/ocsp/ocsp_lib.c
@@ -266,8 +266,11 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
  err:
     OPENSSL_free(buf);
     OPENSSL_free(*ppath);
+    *ppath = NULL;
     OPENSSL_free(*pport);
+    *pport = NULL;
     OPENSSL_free(*phost);
+    *phost = NULL;
     return 0;
 
 }


More information about the openssl-commits mailing list