summaryrefslogtreecommitdiff
path: root/ext/pcntl
diff options
context:
space:
mode:
authorJason Greene <jason@php.net>2002-05-06 23:01:46 +0000
committerJason Greene <jason@php.net>2002-05-06 23:01:46 +0000
commitf30fefcb309b55d9763a324ca2ccbda362cd5240 (patch)
tree70ecaa970a2bde43fd18fde37957802e25571c09 /ext/pcntl
parentac876a4981ff8d8b8ae951e473783c4c837d8477 (diff)
downloadphp-git-f30fefcb309b55d9763a324ca2ccbda362cd5240.tar.gz
Fix invalid warning caused by bogus convert_to_* calls
Fix possible invalid data in status for pcntl_waitpid()
Diffstat (limited to 'ext/pcntl')
-rwxr-xr-xext/pcntl/pcntl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 4fdbd1f15c..8f48cbb578 100755
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -227,6 +227,8 @@ PHP_FUNCTION(pcntl_waitpid)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz|l", &pid, &z_status, &options) == FAILURE)
return;
+
+ convert_to_long_ex(&z_status);
status = Z_LVAL_P(z_status);
@@ -622,8 +624,7 @@ void pcntl_zend_extension_statement_handler(zend_op_array *op_array)
if (zend_hash_index_find(&PCNTL_G(php_signal_table), *signal_num, (void *) &func_name)==FAILURE) {
continue;
}
- convert_to_long_ex(&param);
- convert_to_string_ex(&call_name);
+
ZVAL_LONG(param, *signal_num);
ZVAL_STRING(call_name, func_name, 0);