mirror of
https://github.com/boostorg/regex.git
synced 2025-07-19 07:12:07 +02:00
de-fuzz: previous fix broke some code, re-fix it.
This commit is contained in:
@ -479,8 +479,7 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
|
|||||||
// now recursively add more states, this will terminate when we get to a
|
// now recursively add more states, this will terminate when we get to a
|
||||||
// matching ')' :
|
// matching ')' :
|
||||||
//
|
//
|
||||||
if(!parse_all())
|
parse_all();
|
||||||
return false;
|
|
||||||
//
|
//
|
||||||
// Unwind pushed alternatives:
|
// Unwind pushed alternatives:
|
||||||
//
|
//
|
||||||
@ -512,7 +511,8 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
|
|||||||
this->fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_end));
|
this->fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_end));
|
||||||
return false;
|
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
|
#ifndef BOOST_NO_STD_DISTANCE
|
||||||
if(markid && (this->flags() & regbase::save_subexpression_location))
|
if(markid && (this->flags() & regbase::save_subexpression_location))
|
||||||
this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
|
this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
|
||||||
|
Reference in New Issue
Block a user