Modify

Opened 6 years ago

Closed 3 years ago

#5259 closed Bugs (invalid)

embedded nulls not processed parsed correctly from xml

Reported by: Shawn Tsai <sstsai@…> Owned by: cornedbee
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@…> 6 years ago.
a test file along with a test function and a patch file

Download all attachments as: .zip

Change History (6)

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

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

comment:1 Changed 6 years ago by cornedbee

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

comment:2 Changed 5 years ago by cornedbee

  • Resolution set to fixed
  • Status changed from new to closed

(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 5 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 5 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 3 years ago by cornedbee

  • Resolution set to invalid
  • Status changed from reopened to closed

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.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cornedbee.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.