[Boost-bugs] [Boost C++ Libraries] #2970: Out of boundary access with STLPort

Subject: [Boost-bugs] [Boost C++ Libraries] #2970: Out of boundary access with STLPort
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-04-27 17:16:40


#2970: Out of boundary access with STLPort
--------------------------+-------------------------------------------------
 Reporter: Jazz | Owner: nasonov
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: lexical_cast
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------
 In lexical_cast.hpp, line 519, it is assumed that empty strings end with a
 null char, but this is not true with STLPort :

 {{{char last_grp_size = grouping[0] <= 0 ? CHAR_MAX : grouping[0];}}}

 {{{grouping[0]}}} has an undefined value when {{{grouping}}} is empty. I
 propose this to fix it :

 {{{char last_grp_size = grouping_size == 0 || grouping[0] <= 0 ? CHAR_MAX
 : grouping[0];}}}

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