[php-src] master: Merge branch 'PHP-8.6'

From: Date: Fri, 25 Sep 2026 22:36:04 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141577@lists.php.net to get a copy of this message
Author: Daniel Scherzer (DanielEScherzer) Date: 2026-09-25T15:35:00-07:00 Commit: https://github.com/php/php-src/commit/398dde511e93730a5670cfead535f01dc66f96d1 Raw diff: https://github.com/php/php-src/commit/398dde511e93730a5670cfead535f01dc66f96d1.diff Merge branch 'PHP-8.6' * PHP-8.6: JSON fuzzer: use options for handling invalid UTF-8 and big strings (#23877) Changed paths: M sapi/fuzzer/fuzzer-json.c Diff: diff --git a/sapi/fuzzer/fuzzer-json.c b/sapi/fuzzer/fuzzer-json.c index 5029cb9a585d..0407a895835e 100644 --- a/sapi/fuzzer/fuzzer-json.c +++ b/sapi/fuzzer/fuzzer-json.c @@ -24,6 +24,7 @@ #include <stdlib.h> #include "fuzzer-sapi.h" +#include "ext/json/php_json.h" #include "ext/json/php_json_parser.h" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { @@ -36,10 +37,25 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { memcpy(data, Data, Size); data[Size] = '\0'; - for (int option = 0; option <=1; ++option) { + int options[12] = { + 0, + PHP_JSON_OBJECT_AS_ARRAY, + PHP_JSON_OBJECT_AS_ARRAY | PHP_JSON_BIGINT_AS_STRING, + PHP_JSON_OBJECT_AS_ARRAY | PHP_JSON_BIGINT_AS_STRING | PHP_JSON_INVALID_UTF8_IGNORE, + PHP_JSON_OBJECT_AS_ARRAY | PHP_JSON_BIGINT_AS_STRING | PHP_JSON_INVALID_UTF8_SUBSTITUTE, + PHP_JSON_OBJECT_AS_ARRAY | PHP_JSON_INVALID_UTF8_IGNORE, + PHP_JSON_OBJECT_AS_ARRAY | PHP_JSON_INVALID_UTF8_SUBSTITUTE, + PHP_JSON_BIGINT_AS_STRING, + PHP_JSON_BIGINT_AS_STRING | PHP_JSON_INVALID_UTF8_IGNORE, + PHP_JSON_BIGINT_AS_STRING | PHP_JSON_INVALID_UTF8_SUBSTITUTE, + PHP_JSON_INVALID_UTF8_IGNORE, + PHP_JSON_INVALID_UTF8_SUBSTITUTE + }; + + for (int index = 0; index < 12; ++index) { zval result; php_json_parser parser; - php_json_parser_init(&parser, &result, data, Size, option, 10); + php_json_parser_init(&parser, &result, data, Size, options[index], 10); if (php_json_yyparse(&parser) == SUCCESS) { zval_ptr_dtor(&result); }

« previous php.cvs (#141577) next »