Re: [Boost-bugs] [Boost C++ Libraries] #4123: smatches contains wrong matches, access changes content

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4123: smatches contains wrong matches, access changes content
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-04-20 17:54:44


#4123: smatches contains wrong matches, access changes content
--------------------------------------+-------------------------------------
  Reporter: g_sauthoff@… | Owner: johnmaddock
      Type: Bugs | Status: closed
 Milestone: Boost 1.43.0 | Component: regex
   Version: Boost Development Trunk | Severity: Problem
Resolution: invalid | Keywords:
--------------------------------------+-------------------------------------
Changes (by johnmaddock):

  * status: new => closed
  * resolution: => invalid

Comment:

 There is a bug in your code: you are passing a ''temporary'' std::string
 object to regex_search, so after the call the match_results object
 contains invalidated iterators (iterators into an object that has already
 been destroyed) - leading to garbage output.

 HTH, John.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4123#comment:1>
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:02 UTC