From 51ea2cfbe1c8c3cbfdc381c6f2ff4d43af520938 Mon Sep 17 00:00:00 2001 From: Fabien Villepinte Date: Fri, 27 Oct 2017 14:14:04 +0200 Subject: Fix bug #75307 Wrong reflection for openssl_open function --- NEWS | 1 + ext/openssl/openssl.c | 9 +++++---- ext/openssl/tests/bug75307.phpt | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 ext/openssl/tests/bug75307.phpt diff --git a/NEWS b/NEWS index e3d8178646..d1cfc0f8a4 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,7 @@ PHP NEWS - OpenSSL: . Fixed bug #75363 (openssl_x509_parse leaks memory). (Bob, Jakub Zelenka) + . Fixed bug #75307 (Wrong reflection for openssl_open function). (villfa) - PGSQL: . Fixed bug #75419 (Default link incorrectly cleared/linked by pg_close()). (Sara) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 9b8a2fc968..41d65533a5 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -358,17 +358,18 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_seal, 0, 0, 4) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(1, sealdata) - ZEND_ARG_INFO(1, ekeys) /* arary */ + ZEND_ARG_INFO(1, ekeys) /* array */ ZEND_ARG_INFO(0, pubkeys) /* array */ ZEND_ARG_INFO(0, method) ZEND_ARG_INFO(1, iv) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_openssl_open, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_open, 0, 0, 4) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(1, opendata) ZEND_ARG_INFO(0, ekey) ZEND_ARG_INFO(0, privkey) + ZEND_ARG_INFO(0, method) ZEND_ARG_INFO(0, iv) ZEND_END_ARG_INFO() @@ -5336,7 +5337,7 @@ PHP_FUNCTION(openssl_verify) } /* }}} */ -/* {{{ proto int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys) +/* {{{ proto int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys [, string method [, &string iv]])) Seals data */ PHP_FUNCTION(openssl_seal) { @@ -5465,7 +5466,7 @@ clean_exit: } /* }}} */ -/* {{{ proto bool openssl_open(string data, &string opendata, string ekey, mixed privkey) +/* {{{ proto bool openssl_open(string data, &string opendata, string ekey, mixed privkey [, string method [, string iv]]) Opens data */ PHP_FUNCTION(openssl_open) { diff --git a/ext/openssl/tests/bug75307.phpt b/ext/openssl/tests/bug75307.phpt new file mode 100644 index 0000000000..606f7a523b --- /dev/null +++ b/ext/openssl/tests/bug75307.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #75307 Wrong reflection for openssl_open function +--SKIPIF-- + +--FILE-- +getNumberOfParameters()); +var_dump($rf->getNumberOfRequiredParameters()); +?> +===DONE=== +--EXPECT-- +int(6) +int(4) +===DONE=== -- cgit v1.2.1