[Boost-bugs] [Boost C++ Libraries] #7517: indirect_streambuf: invalid state change if write() writes less data then requested

Subject: [Boost-bugs] [Boost C++ Libraries] #7517: indirect_streambuf: invalid state change if write() writes less data then requested
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-17 10:07:03


#7517: indirect_streambuf: invalid state change if write() writes less data then
requested
-------------------------------------------------------+--------------------
 Reporter: Oleg Liatte <oleg.liatte@…> | Owner: turkanis
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: iostreams
  Version: Boost 1.49.0 | Severity: Problem
 Keywords: write fail duplication buffer consistency |
-------------------------------------------------------+--------------------
 Currently indirect_streambuf::sync_impl() calls setp() to update pbase()
 without any regard to current pbase() value. With unreliable write() it
 will lead to buffer consistency loss and data duplication if write()
 doesn't satisfy request fully two or more times in a row.

 As a solution setp() should use pbase() as current buffer begin instead of
 out().begin(). See patch.

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