From 8082b4c944038baff80fe7f7341f2d02b895bac4 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 10 May 2021 16:06:22 +0100 Subject: [PATCH] Use uint32_t for number of variadic arguments in ZPP --- Zend/zend_API.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 7b797e5a939..1e062534ce0 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1020,7 +1020,7 @@ static zend_result zend_parse_va_args(uint32_t num_args, const char *type_spec, bool have_varargs = 0; bool have_optional_args = 0; zval **varargs = NULL; - int *n_varargs = NULL; + uint32_t *n_varargs = NULL; for (spec_walk = type_spec; *spec_walk; spec_walk++) { c = *spec_walk; @@ -1115,11 +1115,11 @@ static zend_result zend_parse_va_args(uint32_t num_args, const char *type_spec, } if (*type_spec == '*' || *type_spec == '+') { - int num_varargs = num_args + 1 - post_varargs; + uint32_t num_varargs = num_args + 1 - post_varargs; /* eat up the passed in storage even if it won't be filled in with varargs */ varargs = va_arg(*va, zval **); - n_varargs = va_arg(*va, int *); + n_varargs = va_arg(*va, uint32_t *); type_spec++; if (num_varargs > 0) {