Opened 14 years ago

Closed 12 years ago

#2856 closed Bugs (wontfix)

Rapid XML 1.12 doesn't handle zero-length strings correctly

Reported by: Chris Owned by: Sebastian Redl
Milestone: Boost 1.40.0 Component: property_tree
Version: Boost Development Trunk Severity: Problem
Keywords: Cc: mateusz@…

Description

[My patch, copied from sourceforge.]

Rapid XML 1.12 interprets a zero, when specified as a string's length, as indicating that the string is a C-string & its length should be calculated appropriately. This makes it difficult to add variable length data where it may have zero length, but isn't necessarily a C-string. This may have also introduced hidden bugs into users code. Zero is a valid length for data & should be interpreted literally.

The attached patch defines a new constant auto_size to use instead of 0 and modifies code appropriately. Note: The change was sufficient for my usage. It probably requires some further work to update every occurrence.

Attachments (1)

rapidxml.hpp.diff2 (5.6 KB ) - added by Chris 14 years ago.
Initial patch to handle zero-length strings.

Download all attachments as: .zip

Change History (6)

by Chris, 14 years ago

Attachment: rapidxml.hpp.diff2 added

Initial patch to handle zero-length strings.

comment:1 by Chris, 13 years ago

Milestone: Boost 1.39.0Boost 1.40.0

comment:2 by mloskot <mateusz@…>, 13 years ago

Cc: mateusz@… added

comment:3 by Sebastian Redl, 13 years ago

Owner: changed from kaalus to Sebastian Redl
Status: newassigned

comment:4 by Sebastian Redl, 12 years ago

RapidXML is an implementation detail. Why would I care about its suitability for the end user?

comment:5 by Sebastian Redl, 12 years ago

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.