From: Rob Richards Date: Wed, 9 Jan 2008 16:46:52 +0000 (+0000) Subject: fix crash when using default algorithm X-Git-Tag: RELEASE_2_0_0a1~964 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e656bee3b4cff412724f8c5e1b3d2a58b1df219;p=php fix crash when using default algorithm --- diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index fdbc348acd..4816b0b76b 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -3725,7 +3725,7 @@ PHP_FUNCTION(openssl_sign) } 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 @@ PHP_FUNCTION(openssl_verify) } 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);