summaryrefslogtreecommitdiffstats
path: root/libcxx/include/regex
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-06-28 19:11:23 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-06-28 19:11:23 +0000
commit8d1e82243270f922058375ee0db2eed8a9e34138 (patch)
tree0456edc6a535e5f23cfc9806627f653f267960b5 /libcxx/include/regex
parente5fdfdc07bbdb1cd9abf2506db9cb97ae3ed8e23 (diff)
downloadbcm5719-llvm-8d1e82243270f922058375ee0db2eed8a9e34138.tar.gz
bcm5719-llvm-8d1e82243270f922058375ee0db2eed8a9e34138.zip
William Fisher: A bug in __lookahead::exec causes /(?=^)b/ to match ab. When makes a recursive call to , it passes true for the value of . This causes a beginning-of-line anchor (^) inside a lookahead assertion to match anywhere in the text. This fixes http://llvm.org/bugs/show_bug.cgi?id=11118
llvm-svn: 185196
Diffstat (limited to 'libcxx/include/regex')
-rw-r--r--libcxx/include/regex2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 27c7ecfa4e5..75c61db3cfa 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -2921,7 +2921,7 @@ __lookahead<_CharT, _Traits>::__exec(__state& __s) const
bool __matched = __exp_.__match_at_start_ecma(__s.__current_, __s.__last_,
__m,
__s.__flags_ | regex_constants::match_continuous,
- true);
+ __s.__at_first_ && __s.__current_ == __s.__first_);
if (__matched != __invert_)
{
__s.__do_ = __state::__accept_but_not_consume;
OpenPOWER on IntegriCloud