diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2016-01-19 00:50:37 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2016-01-19 00:50:37 +0000 |
| commit | b414b2f54b0acaddefdb4a36ec19e01394cec180 (patch) | |
| tree | 8048d1fc5beca61c2d2caa3ac3cbecb7090ce087 /libcxx/include/regex | |
| parent | 848da137186c745e105b4937e68cc5d6edd2d30c (diff) | |
| download | bcm5719-llvm-b414b2f54b0acaddefdb4a36ec19e01394cec180.tar.gz bcm5719-llvm-b414b2f54b0acaddefdb4a36ec19e01394cec180.zip | |
Fix PR#26175. Thanks to Josh Petrie for the report and the patch. Reviewed as http://reviews.llvm.org/D16262
llvm-svn: 258107
Diffstat (limited to 'libcxx/include/regex')
| -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; |

