From: Nikita Popov Date: Tue, 13 Oct 2020 15:53:49 +0000 (+0200) Subject: Sanity check zpp max argument count X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5070549577bbad13941d7c2bb9a9a8456797baf1;p=php Sanity check zpp max argument count This would have prevented 9b4094c. Closes GH-6334. --- diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 0b6808b678..301b040004 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -1311,6 +1311,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char * } while (0) #define ZEND_PARSE_PARAMETERS_END_EX(failure) \ + ZEND_ASSERT(_i == _max_num_args || _max_num_args == (uint32_t) -1); \ } while (0); \ if (UNEXPECTED(_error_code != ZPP_ERROR_OK)) { \ if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \