Opened 7 years ago

Closed 4 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:


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

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

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Shawn Tsai <sstsai@…>

Attachment: added

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

comment:1 Changed 7 years ago by Sebastian Redl

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

comment:2 Changed 6 years ago by Sebastian Redl

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 Changed 6 years ago by arkadiy_s@…

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 Changed 6 years ago by anonymous

Resolution: fixed
Status: closedreopened

comment:5 Changed 4 years ago by Sebastian Redl

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.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Sebastian Redl.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.