mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02: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:
parent
25e2cfc27b
commit
5d05f810d0
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue