Opened 12 years ago
Closed 12 years ago
#4245 closed Bugs (fixed)
encode_char_entities does not handle empty string properly (affects write_graphml)
Reported by: | Owned by: | Sebastian Redl | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | property_tree |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | graph, write_graphml, xml | Cc: | alfeld@… |
Description
The write_graphml function uses encode_char_entities from the property_tree::xml_parser. This latter function does not behave properly when passed an empty string.
I fixed this by modifying encode_char_entities to work properly in the empty string case. I found this preferable to patching write_graphml to be aware of the limitation of encode_char_entities.
Attached is a sample program that crashes on my system (Snow Leopard), the output and stack trace of that crash, and a patch to trunk r62110 which fixes the issue.
Attachments (4)
Change History (6)
by , 12 years ago
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [62195]) Make encode_char_entities safe against empty strings, because Graph uses it that way. Fixes bug 4245. Based on patch by Christopher Alfeld.
Program to demonstrate problems -- throws std::length_error.