wez             Tue Oct 26 05:29:21 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/ext/openssl        openssl.c 
  Log:
  Fix for Bug #29418 (double free when openssl_csr_new fails).
  Also hook up MSHUTDOWN function which appears to have never been enabled.
  
  Patch by Kamesh Jayachandran
  
  
  
http://cvs.php.net/diff.php/php-src/ext/openssl/openssl.c?r1=1.52.2.17&r2=1.52.2.18&ty=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.52.2.17 php-src/ext/openssl/openssl.c:1.52.2.18
--- php-src/ext/openssl/openssl.c:1.52.2.17     Mon Oct 13 07:42:18 2003
+++ php-src/ext/openssl/openssl.c       Tue Oct 26 05:29:21 2004
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: openssl.c,v 1.52.2.17 2003/10/13 11:42:18 wez Exp $ */
+/* $Id: openssl.c,v 1.52.2.18 2004/10/26 09:29:21 wez Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -118,7 +118,7 @@
        "openssl",
        openssl_functions,
        PHP_MINIT(openssl),
-       NULL,
+       PHP_MSHUTDOWN(openssl),
        NULL,
        NULL,
        PHP_MINFO(openssl),
@@ -1616,6 +1616,12 @@
                                                        req.priv_key = NULL; /* make 
sure the cleanup code doesn't zap it! */
                                        }
                                }
+                               else {
+                                       if (!we_made_the_key) {
+                                               /* if we have not made the key we are 
not supposed to zap it by calling dispose! */
+                                               req.priv_key = NULL;
+                                       }
+                               }
                        }
                }
        }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to