commit | 550dfe79ca8c3a2ec5fbf2e34ad40fe66eb7c09f | [log] [tgz] |
---|---|---|
author | Marshall Clow <mclow.lists@gmail.com> | Mon Aug 24 15:57:09 2015 +0000 |
committer | Marshall Clow <mclow.lists@gmail.com> | Mon Aug 24 15:57:09 2015 +0000 |
tree | e0b66d45dcc12eba2e8c38f0c854075b56226dfd | |
parent | db2f8a3cfdeb7cae5178bc84d185ec3765095a9d [diff] [blame] |
Fix a crasher found by libFuzzer llvm-svn: 245849
diff --git a/libcxx/include/regex b/libcxx/include/regex index b355bbb..b2b556e 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex
@@ -1733,6 +1733,8 @@ void __back_ref<_CharT>::__exec(__state& __s) const { + if (__mexp_ > __s.__sub_matches_.size()) + __throw_regex_error<regex_constants::error_backref>(); sub_match<const _CharT*>& __sm = __s.__sub_matches_[__mexp_-1]; if (__sm.matched) {