Merge branch 'PHP-8.3' into PHP-8.4

* PHP-8.3:
  Fix GH-18901: integer overflow mb_split
This commit is contained in:
Niels Dossche 2025-06-22 13:08:05 +02:00
commit 2577e3a703
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
3 changed files with 58 additions and 1 deletions

View file

@ -1184,7 +1184,7 @@ PHP_FUNCTION(mb_split)
size_t string_len;
int err;
zend_long count = -1;
zend_ulong count = -1; /* unsigned, it's a limit and we want to prevent signed overflow */
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &arg_pattern, &arg_pattern_len, &string, &string_len, &count) == FAILURE) {
RETURN_THROWS();