Re: [Boost-bugs] [Boost C++ Libraries] #7032: Prevent tool Bug Fix.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7032: Prevent tool Bug Fix.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-06-29 06:19:15


#7032: Prevent tool Bug Fix.
----------------------------------+-----------------------------------------
  Reporter: g.gupta@… | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: regex
   Version: Boost 1.50.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------+-----------------------------------------

Comment (by g.gupta@…):

 This extra assert take care of situation when start is 0 (null) and
 datasize is not zero.
 In that case Memcpy will crash because the source is null but data size is
 not zero.
 [[BR]]
 ----------
 example of memcpy behaviour[[BR]]

 memcpy(p1, NULL, 0); // No error[[BR]]

 memcpy(p1, NULL, 1); //''' Crash as memcpy function will read 1 byte
 at null
 location''' [[BR]]

 -------
 The patch which we provided takes care of this situation. This is possible
 that start is zero and datasize is non zero and it is obvious that adding
 the extra assert doesn't harm :-)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7032#comment:2>
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:09 UTC