diff options
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/regex | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex index b9dac4765cd..ca455f0ceea 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -4265,6 +4265,9 @@ basic_regex<_CharT, _Traits>::__parse_atom_escape(_ForwardIterator __first, if (__first != __last && *__first == '\\') { _ForwardIterator __t1 = _VSTD::next(__first); + if (__t1 == __last) + __throw_regex_error<regex_constants::error_escape>(); + _ForwardIterator __t2 = __parse_decimal_escape(__t1, __last); if (__t2 != __t1) __first = __t2; |

