Regex: Repeating a repeat is not allowed, even if there is a comment block in between the two.

Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3479#c2
This commit is contained in:
jzmaddock
2017-10-24 17:56:02 +01:00
parent 544e20a339
commit 50453e319a
2 changed files with 39 additions and 15 deletions

View File

@ -205,6 +205,11 @@ void test_options()
TEST_REGEX_SEARCH("(a (?x)b c)d e", perl, "a bcde", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("(a b(?x)c d (?-x)e f)", perl, "a bcde f", match_default, make_array(0, 8, 0, 8, -2, -2));
TEST_REGEX_SEARCH("(a b(?x)c d (?-x)e f)", perl, "abcdef", match_default, make_array(-2, -2));
TEST_INVALID_REGEX("a++(?#abc)+", perl);
TEST_INVALID_REGEX("a++(?#abc)?", perl);
TEST_INVALID_REGEX("a++(?#abc)*", perl);
TEST_INVALID_REGEX("a++(?#abc){2}", perl);
}
void test_options2()