Opened 10 years ago
#7517 new Bugs
indirect_streambuf: invalid state change if write() writes less data then requested
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost 1.49.0 | Severity: | Problem |
Keywords: | write fail duplication buffer consistency | Cc: |
Description
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.
Attachments (1)
Note:
See TracTickets
for help on using tickets.