Opened 11 years ago

Last modified 11 years ago

#6236 new Bugs

code_converter does not allocate second buffer

Reported by: Steve Clementi <sclementi2@…> Owned by: Jonathan Turkanis
Milestone: To Be Determined Component: iostreams
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

The code_converter will not allocate the second buffer for bidirectional devices.

The open method checks

if (can_write::value && !is_double::value)

but it should be

if (can_write::value && is_double::value)

Attachments (2)

boostTests.cpp (2.0 KB ) - added by Steve Clementi <sclementi2@…> 11 years ago.
test code
code_converter.patch (496 bytes ) - added by Steve Clementi <sclementi2@…> 11 years ago.
patch correcting this bug

Download all attachments as: .zip

Change History (3)

by Steve Clementi <sclementi2@…>, 11 years ago

Attachment: boostTests.cpp added

test code

comment:1 by Steve Clementi <sclementi2@…>, 11 years ago

The test code blows up in the utf8_codecvt_facet do_out method when trying to access the unallocated 'to' buffer.

by Steve Clementi <sclementi2@…>, 11 years ago

Attachment: code_converter.patch added

patch correcting this bug

Note: See TracTickets for help on using tickets.