Opened 12 years ago

Closed 9 years ago

#5259 closed Bugs (invalid)

embedded nulls not processed parsed correctly from xml

Reported by: Shawn Tsai <sstsai@…> Owned by: Sebastian Redl
Milestone: To Be Determined Component: property_tree
Version: Boost 1.46.0 Severity: Problem
Keywords: Cc:

Description

Embedded null in any value field of an xml file will result in a truncated string in the property_tree.

Attachments (1)

test.zip (1.0 KB ) - added by Shawn Tsai <sstsai@…> 12 years ago.
a test file along with a test function and a patch file

Download all attachments as: .zip

Change History (6)

by Shawn Tsai <sstsai@…>, 12 years ago

Attachment: test.zip added

a test file along with a test function and a patch file

comment:1 by Sebastian Redl, 11 years ago

(In [72001]) Allow nuls in PTree XML. See bug 5259.

comment:2 by Sebastian Redl, 11 years ago

Resolution: fixed
Status: newclosed

(In [76447]) Merge [72000],[72001],[72003], [74691], [75587], [75589], [75590], and [75593] from trunk. Fixes bug 4840. Fixes bug 5259. Fixes bug 5281, I think. Fixes bug 5944. Fixes bug 5757. Fixes bug 5710. Fixes bug 5307, I think.

comment:3 by arkadiy_s@…, 10 years ago

It is supposed that Ptree have constructor from std::basic_string (see property_tree/detail/xml_parser_read_rapidxml.hpp line 77), but it actually doesn't. We don't use boost::property_tree::ptree, we use our implementation of pree. BTW user can use boost::property_tree::basic_ptree from different types.

Please revert this fix!

comment:4 by anonymous, 10 years ago

Resolution: fixed
Status: closedreopened

comment:5 by Sebastian Redl, 9 years ago

Resolution: invalid
Status: reopenedclosed

All the serializers only work with PTrees whose data type is std::basic_string. Anything different is just an accident.

This will be clarified with the doc update, and possibly changed eventually. But I have to figure out a good way of doing so.

Note: See TracTickets for help on using tickets.