mirror of
https://github.com/boostorg/regex.git
synced 2025-07-18 23:02:09 +02:00
Fix access violation caused by past-the-end iterator deference for expressions such as ".*?".
[SVN r72540]
This commit is contained in:
@ -941,7 +941,8 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
|
|||||||
++m_position;
|
++m_position;
|
||||||
}
|
}
|
||||||
// for perl regexes only check for pocessive ++ repeats.
|
// for perl regexes only check for pocessive ++ repeats.
|
||||||
if((0 == (this->flags() & regbase::main_option_type))
|
if((m_position != m_end)
|
||||||
|
&& (0 == (this->flags() & regbase::main_option_type))
|
||||||
&& (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
|
&& (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
|
||||||
{
|
{
|
||||||
pocessive = true;
|
pocessive = true;
|
||||||
|
Reference in New Issue
Block a user