forked from boostorg/regex
Fix bugs reported by Will Drewry: certain invalid regexes can cause the library to access invalid memory, changed to ensure that the correct exception is thrown long before this happens.
[SVN r42674]
This commit is contained in:
@ -121,6 +121,17 @@ void test_conditionals()
|
||||
TEST_INVALID_REGEX("(?:(a)|b)(?(?:", perl);
|
||||
TEST_INVALID_REGEX("(?:(a)|b)(?(?<", perl);
|
||||
TEST_INVALID_REGEX("(?:(a)|b)(?(?<a", perl);
|
||||
|
||||
TEST_INVALID_REGEX("(?(?!#?)+)", perl);
|
||||
TEST_INVALID_REGEX("(?(?=:-){0})", perl);
|
||||
TEST_INVALID_REGEX("(?(123){1})", perl);
|
||||
TEST_INVALID_REGEX("(?(?<=A)*)", perl);
|
||||
TEST_INVALID_REGEX("(?(?<=A)+)", perl);
|
||||
|
||||
TEST_INVALID_REGEX("(?<!*|^)", perl);
|
||||
TEST_INVALID_REGEX("(?<!*|A)", perl);
|
||||
TEST_INVALID_REGEX("(?<=?|A)", perl);
|
||||
TEST_INVALID_REGEX("(?<=*|\B)", perl);
|
||||
}
|
||||
|
||||
void test_options()
|
||||
|
Reference in New Issue
Block a user