com php-src: Add missing zend_parse_parameters_none() checks: ext/hash/hash.c ext/openssl/openssl.c ex t/standard/basic_functions.c
ext/standard/info.c ext/ standard/math.c

From: Date: Tue, 08 Oct 2019 21:10:18 +0000
Subject: com php-src: Add missing zend_parse_parameters_none() checks: ext/hash/hash.c ext/openssl/openssl.c ex t/standard/basic_functions.c
ext/standard/info.c ext/ standard/math.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-108818@lists.php.net to get a copy of this message
Commit: 95181553c84d5d02fbae773e2d4fc63fcf15ba23 Author: Gabriel Caruso <carusogabriel34@gmail.com> Tue, 8 Oct 2019 01:27:38 +0200 Parents: b0cf34a30c1edd43e4762f66ecde2c10454ca11e Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=95181553c84d5d02fbae773e2d4fc63fcf15ba23 Log: Add missing zend_parse_parameters_none() checks Closes GH-4796. Changed paths: M ext/hash/hash.c M ext/openssl/openssl.c M ext/standard/basic_functions.c M ext/standard/info.c M ext/standard/math.c Diff: diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 82475617588..6b869affdea 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -616,6 +616,10 @@ PHP_FUNCTION(hash_hmac_algos) zend_string *str; const php_hash_ops *ops; + if (zend_parse_parameters_none() == FAILURE) { + return; + } + array_init(return_value); ZEND_HASH_FOREACH_STR_KEY_PTR(&php_hash_hashtable, str, ops) { if (ops->is_crypto) { diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index d342f1e71ad..912c57f709f 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1626,6 +1626,10 @@ PHP_MSHUTDOWN_FUNCTION(openssl) Retrieve an array mapping available certificate locations */ PHP_FUNCTION(openssl_get_cert_locations) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } + array_init(return_value); add_assoc_string(return_value, "default_cert_file", (char *) X509_get_default_cert_file()); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 921c7042885..01071dd244f 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4636,6 +4636,10 @@ PHP_FUNCTION(print_r) Returns true if client disconnected */ PHP_FUNCTION(connection_aborted) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } + RETURN_LONG(PG(connection_status) & PHP_CONNECTION_ABORTED); } /* }}} */ @@ -4644,6 +4648,10 @@ PHP_FUNCTION(connection_aborted) Returns the connection status bitfield */ PHP_FUNCTION(connection_status) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } + RETURN_LONG(PG(connection_status)); } /* }}} */ diff --git a/ext/standard/info.c b/ext/standard/info.c index 81bd897a25c..bb3c71d9b5f 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -1322,7 +1322,7 @@ PHP_FUNCTION(php_sapi_name) /* }}} */ -/* {{{ proto string php_uname(void) +/* {{{ proto string php_uname([ string $mode = "a"]) Return information about the system PHP was built on */ PHP_FUNCTION(php_uname) { diff --git a/ext/standard/math.c b/ext/standard/math.c index f903615d757..b2e56f5a272 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -570,6 +570,10 @@ PHP_FUNCTION(atanh) Returns an approximation of pi */ PHP_FUNCTION(pi) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } + RETURN_DOUBLE(M_PI); } /* }}} */

« previous php.cvs (#108818) next »