diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
commit | 044eb2f6afba375a914ac9d8024f8f5142bb912e (patch) | |
tree | 1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /unittests/Support/RegexTest.cpp | |
parent | eb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff) |
Notes
Diffstat (limited to 'unittests/Support/RegexTest.cpp')
-rw-r--r-- | unittests/Support/RegexTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Support/RegexTest.cpp b/unittests/Support/RegexTest.cpp index 5e3ce39f0057..7e44a3c0614a 100644 --- a/unittests/Support/RegexTest.cpp +++ b/unittests/Support/RegexTest.cpp @@ -171,4 +171,12 @@ TEST_F(RegexTest, MatchInvalid) { EXPECT_FALSE(r1.match("X")); } +// https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3727 +TEST_F(RegexTest, OssFuzz3727Regression) { + // Wrap in a StringRef so the NUL byte doesn't terminate the string + Regex r(StringRef("[[[=GS\x00[=][", 10)); + std::string Error; + EXPECT_FALSE(r.isValid(Error)); +} + } |