Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1230: mbstate uninitialized
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-11-26 09:43:20
#1230: mbstate uninitialized
-------------------------------------+--------------------------------------
Reporter: Jan-Erik.Dahlin_at_[hidden] | Owner: bemandawes
Type: Bugs | Status: closed
Milestone: Boost 1.35.0 | Component: filesystem
Version: Boost 1.34.1 | Severity: Problem
Resolution: fixed | Keywords:
-------------------------------------+--------------------------------------
Comment (by Jan-Erik.Dahlin_at_[hidden]):
It '''needs''' to be initialized. As the name implies the mbstate tracks
the state of a multibyte access, e.g. if the previous access or conversion
only was a partial translation (this can happen if the previous read
operation only got half the multibyte character and the other half comes
in the current read).
If we start with an uninitialized mbstate the current access can
accidentally be performed as a continuation of a partial access. That will
produce unexpected results.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1230#comment:3>
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:49:57 UTC