[Boost-bugs] [Boost C++ Libraries] #7050: Invalid memory write bug in lexing_exception

Subject: [Boost-bugs] [Boost C++ Libraries] #7050: Invalid memory write bug in lexing_exception
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-06-29 09:14:34


#7050: Invalid memory write bug in lexing_exception
---------------------------------+------------------------------------------
 Reporter: g.gupta@… | Owner: hkaiser
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: wave
  Version: Boost 1.50.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 In file boost/wave/cpplexer/cpplexer_exceptions.hpp


 {{{
 lexing_exception(char const *what_, error_code code, int line_,
         int column_, char const *filename_) throw()
     : cpplexer_exception(line_, column_, filename_),
         level(severity_level(code)), code(code)
     {
         unsigned int off = 0;
         while (off < sizeof(buffer) && *what_)
             buffer[off++] = *what_++;
         buffer[off] = 0;
     }
 }}}

 If value of '''off is 511''', then Invalid memory write will occur at
 ''' buffer[off] = 0;'''.[[BR]]Attached patch is the fix for it.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7050>
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