mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Reduce max input size in parser fuzzer
Still seeing stack overflows for $$$$$x style input, let's reduce the input size limit further...
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include "fuzzer-sapi.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
if (Size > 7 * 1024) {
|
||||
if (Size > 6 * 1024) {
|
||||
/* Large inputs have a large impact on fuzzer performance and may cause stack overflows,
|
||||
* but are unlikely to be necessary to reach new codepaths. */
|
||||
return 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ $it = new RecursiveIteratorIterator(
|
||||
$corpusDir = __DIR__ . '/corpus/parser';
|
||||
@mkdir($corpusDir);
|
||||
|
||||
$maxLen = 7 * 1024;
|
||||
$maxLen = 6 * 1024;
|
||||
foreach ($it as $file) {
|
||||
if (!preg_match('/\.phpt$/', $file)) continue;
|
||||
$code = file_get_contents($file);
|
||||
|
||||
Reference in New Issue
Block a user