diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-10-19 22:10:41 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-10-19 22:10:41 +0000 |
commit | 55b9e440a7729420f1fbbc2306dbbe6ebbcc978b (patch) | |
tree | c0304b5b40c40fe53f25db2281b44d43ae35c62c /libcxx/test/std/re/re.regex | |
parent | bff0ef03244116052fa13a4fff199b83af13de71 (diff) | |
download | bcm5719-llvm-55b9e440a7729420f1fbbc2306dbbe6ebbcc978b.tar.gz bcm5719-llvm-55b9e440a7729420f1fbbc2306dbbe6ebbcc978b.zip |
Fix an unsigned integer overflow in regex that lead to a bad memory access. Found by OSS-Fuzz
llvm-svn: 316191
Diffstat (limited to 'libcxx/test/std/re/re.regex')
-rw-r--r-- | libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp index e66d3e976db..8e886cd8d1a 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp @@ -34,6 +34,7 @@ int main() { assert(error_badbackref_thrown("\\1abc")); // no references assert(error_badbackref_thrown("ab(c)\\2def")); // only one reference + assert(error_badbackref_thrown("\\800000000000000000000000000000")); // overflows // this should NOT throw, because we only should look at the '1' // See https://bugs.llvm.org/show_bug.cgi?id=31387 |