Opened 9 years ago

#9259 new Bugs

errors in iostreams container_device example

Reported by: chris.foster@… Owned by: Jonathan Turkanis
Milestone: To Be Determined Component: iostreams
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

Hi,

I've been considering container_device as a more controllable alternative to std::stringstream (to append to a std::vector<char>). I came across two off-by-one errors in the seek() implementation, and a problem in write() which could result in excess characters being written when the container is non-empty to start with.

I'll attach a patch.

Attachments (1)

container_device.diff (1.2 KB ) - added by Chris Foster <chris.foster@…> 9 years ago.
Patch for container_device

Download all attachments as: .zip

Change History (1)

by Chris Foster <chris.foster@…>, 9 years ago

Attachment: container_device.diff added

Patch for container_device

Note: See TracTickets for help on using tickets.