From 0039f160f259dc230fa1979a3fd1c01248b309ad Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 27 Feb 2013 13:53:03 -0500 Subject: [PATCH] Make the functions validate input parameters (or lack thereof) --- zend_accelerator_module.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zend_accelerator_module.c b/zend_accelerator_module.c index 04133f64b6..ba989429a2 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; } -- 2.50.1