Re: [Boost-bugs] [Boost C++ Libraries] #3299: boost regex regex_search crash

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3299: boost regex regex_search crash
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-08-08 13:20:33


#3299: boost regex regex_search crash
------------------------------+---------------------------------------------
 Reporter: ufwt@… | Owner: johnmaddock
     Type: Bugs | Status: assigned
Milestone: Boost 1.40.0 | Component: regex
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------

Comment(by ufwt@…):

 i chanage re_repeat'max , code:

 void changeRegexRepeatNum(boost::regex &regex,size_t max)
 {
     boost::re_detail::re_syntax_base*
 state=regex.get_data().m_first_state;
     while(state){
         switch(state->type){
             case boost::re_detail::syntax_element_rep:
             case boost::re_detail::syntax_element_dot_rep:
             case boost::re_detail::syntax_element_char_rep:
             case boost::re_detail::syntax_element_short_set_rep:
             case boost::re_detail::syntax_element_long_set_rep:
             {
                 boost::re_detail::re_repeat
 *repeat=static_cast<boost::re_detail::re_repeat*>(state);
                 if(repeat->max - repeat->min >max){
                     repeat->max = repeat->min + max;
                 }
             }
             break;
             default:
                 break;
         }
         state = state->next.p;
     }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3299#comment:7>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC