com php-src: Make the functions validate input parameters (or lack thereof): zend_accelerator_module.c
| From: | Dmitry Stogov | Date: | Wed, 27 Feb 2013 18:53:03 +0000 |
| Subject: | com php-src: Make the functions validate input parameters (or lack thereof): zend_accelerator_module.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-71496@lists.php.net to get a copy of this message | ||
Commit: 0039f160f259dc230fa1979a3fd1c01248b309ad
Author: Ilia Alshanetsky <ilia@ilia.ws> Wed, 27 Feb 2013 13:53:03 -0500
Parents: d39a49a5340643483f6a94f391328b2d46a24d3b
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0039f160f259dc230fa1979a3fd1c01248b309ad
Log:
Make the functions validate input parameters (or lack thereof)
Changed paths:
M zend_accelerator_module.c
Diff:
diff --git a/zend_accelerator_module.c b/zend_accelerator_module.c
index 04133f6..ba98942 100644
--- a/zend_accelerator_module.c
+++ b/zend_accelerator_module.c
@@ -466,6 +466,10 @@ static ZEND_FUNCTION(accelerator_get_status)
/* keep the compiler happy */
(void)ht; (void)return_value_ptr; (void)this_ptr; (void)return_value_used;
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled)) {
RETURN_FALSE;
}
@@ -521,6 +525,10 @@ static ZEND_FUNCTION(accelerator_get_configuration)
/* keep the compiler happy */
(void)ht; (void)return_value_ptr; (void)this_ptr; (void)return_value_used;
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
array_init(return_value);
/* directives */
@@ -578,6 +586,10 @@ static ZEND_FUNCTION(accelerator_reset)
/* keep the compiler happy */
(void)ht; (void)return_value_ptr; (void)this_ptr; (void)return_value_used;
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled)) {
RETURN_FALSE;
}