mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
fuzz: Also test xmllint --repeat option
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
*
|
||||
* --path: Requires cooperation with resource loader
|
||||
*
|
||||
* --repeat: Could be limited to 2 when fuzzing
|
||||
*
|
||||
* --relaxng:
|
||||
* --schema:
|
||||
* --schematron: Requires schemas
|
||||
@@ -79,6 +77,7 @@ static const char *const switches[] = {
|
||||
"--pushsmall",
|
||||
"--quiet",
|
||||
"--recover",
|
||||
"--repeat",
|
||||
"--sax1",
|
||||
"--testIO",
|
||||
"--timing",
|
||||
|
||||
@@ -3023,10 +3023,14 @@ xmllintParseOptions(xmllintState *lint, int argc, const char **argv) {
|
||||
lint->generate = 1;
|
||||
} else if ((!strcmp(argv[i], "-repeat")) ||
|
||||
(!strcmp(argv[i], "--repeat"))) {
|
||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
lint->repeat = 2;
|
||||
#else
|
||||
if (lint->repeat > 1)
|
||||
lint->repeat *= 10;
|
||||
else
|
||||
lint->repeat = 100;
|
||||
#endif
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
} else if ((!strcmp(argv[i], "-push")) ||
|
||||
(!strcmp(argv[i], "--push"))) {
|
||||
|
||||
Reference in New Issue
Block a user