Commit: f4873c68a600dcd0c6c548c9ecf2d605da878252 Author: Gustavo André dos Santos Lopes <cataphr...@php.net> Thu, 29 Mar 2012 08:47:58 +0100 Parents: 616d8029747626d24a07156bdfa5e565a88c85f2 67bf07f3e79de6653681d9317229c49b5e2415db Branches: PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f4873c68a600dcd0c6c548c9ecf2d605da878252 Log: Merge branch '5.3' into 5.4 Conflicts: main/output.c Changed paths: MM ext/pcntl/pcntl.c Diff: f4873c68a600dcd0c6c548c9ecf2d605da878252 diff --combined ext/pcntl/pcntl.c index 725d55b,b840066..e5910a5 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@@ -760,7 -760,7 +760,7 @@@ PHP_FUNCTION(pcntl_exec } if (ZEND_NUM_ARGS() > 1) { - /* Build argumnent list */ + /* Build argument list */ args_hash = HASH_OF(args); argc = zend_hash_num_elements(args_hash); @@@ -849,11 -849,6 +849,11 @@@ PHP_FUNCTION(pcntl_signal return; } + if (signo < 1 || signo > 32) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid signal"); + RETURN_FALSE; + } + if (!PCNTL_G(spares)) { /* since calling malloc() from within a signal handler is not portable, * pre-allocate a few records for recording signals */ @@@ -869,9 -864,8 +869,9 @@@ /* Special long value case for SIG_DFL and SIG_IGN */ if (Z_TYPE_P(handle)==IS_LONG) { - if (Z_LVAL_P(handle)!= (long) SIG_DFL && Z_LVAL_P(handle) != (long) SIG_IGN) { + if (Z_LVAL_P(handle) != (long) SIG_DFL && Z_LVAL_P(handle) != (long) SIG_IGN) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value for handle argument specified"); + RETURN_FALSE; } if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) restart_syscalls) == SIG_ERR) { PCNTL_G(last_error) = errno; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php