rrichards Wed Jan 9 16:46:52 2008 UTC
Modified files:
/php-src/ext/openssl openssl.c
Log:
fix crash when using default algorithm
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.153&r2=1.154&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.153 php-src/ext/openssl/openssl.c:1.154
--- php-src/ext/openssl/openssl.c:1.153 Mon Dec 31 07:12:12 2007
+++ php-src/ext/openssl/openssl.c Wed Jan 9 16:46:52 2008
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.153 2007/12/31 07:12:12 sebastian Exp $ */
+/* $Id: openssl.c,v 1.154 2008/01/09 16:46:52 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -3725,7 +3725,7 @@
}
if (method == NULL || Z_TYPE_P(method) == IS_LONG) {
- if (Z_TYPE_P(method) == IS_LONG) {
+ if (method != NULL) {
signature_algo = Z_LVAL_P(method);
}
mdtype = php_openssl_get_evp_md_from_algo(signature_algo);
@@ -3780,7 +3780,7 @@
}
if (method == NULL || Z_TYPE_P(method) == IS_LONG) {
- if (Z_TYPE_P(method) == IS_LONG) {
+ if (method != NULL) {
signature_algo = Z_LVAL_P(method);
}
mdtype = php_openssl_get_evp_md_from_algo(signature_algo);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php