Fix access violation caused by past-the-end iterator deference for expressions such as ".*?".

[SVN r72540]
This commit is contained in:
John Maddock
2011-06-10 17:03:48 +00:00
parent cb142a44b6
commit 27ad285fbf

View File

@ -941,7 +941,8 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
++m_position;
}
// 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))
{
pocessive = true;