cvs: php4 /ext/openssl openssl.c
| From: | Ilia Alshanetsky | Date: | Thu, 02 Jan 2003 21:18:58 +0000 |
| Subject: | cvs: php4 /ext/openssl openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-17534@lists.php.net to get a copy of this message | ||
iliaa Thu Jan 2 16:18:58 2003 EDT
Modified files:
/php4/ext/openssl openssl.c
Log:
Fixed a small memory leak when a NULL variable is passed to
openssl_csr_sign() as the first argument.
Index: php4/ext/openssl/openssl.c
diff -u php4/ext/openssl/openssl.c:1.60 php4/ext/openssl/openssl.c:1.61
--- php4/ext/openssl/openssl.c:1.60 Tue Dec 31 11:07:09 2002
+++ php4/ext/openssl/openssl.c Thu Jan 2 16:18:58 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.60 2002/12/31 16:07:09 sebastian Exp $ */
+/* $Id: openssl.c,v 1.61 2003/01/02 21:18:58 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1310,8 +1310,9 @@
return (X509_REQ*)what;
}
return NULL;
+ } else if (Z_TYPE_PP(val) != IS_STRING) {
+ return NULL;
}
- convert_to_string_ex(val);
if (Z_STRLEN_PP(val) > 7 && memcmp(Z_STRVAL_PP(val), "file://", 7) == 0)
filename = Z_STRVAL_PP(val) + 7;