From f301f3a412976fc55a4fd28fe172f567804a2215 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 21 Feb 2017 12:43:08 +0000 Subject: [PATCH] de-fuzz: previous fix broke some code, re-fix it. --- include/boost/regex/v4/basic_regex_parser.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp index 74bf0d46..31153698 100644 --- a/include/boost/regex/v4/basic_regex_parser.hpp +++ b/include/boost/regex/v4/basic_regex_parser.hpp @@ -479,8 +479,7 @@ bool basic_regex_parser::parse_open_paren() // now recursively add more states, this will terminate when we get to a // matching ')' : // - if(!parse_all()) - return false; + parse_all(); // // Unwind pushed alternatives: // @@ -512,7 +511,8 @@ bool basic_regex_parser::parse_open_paren() this->fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_end)); return false; } - BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark); + if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) + return false; #ifndef BOOST_NO_STD_DISTANCE if(markid && (this->flags() & regbase::save_subexpression_location)) this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);