boostorg / boostorg/property_tree

Parsing of empty attributes

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
65
Forks
97
PR merge metrics
No merged PRs in 30d

Description

While parsing an empty attribute, function parse_node_attributes() correctly creates a new attribute with value of length 0 but it sets the pointer into the buffer instead of to nullptr.
This does not harm in usual circumstances. But in case of cloning, it does. Then allocate_attribute() in clone_node() sets the value as value(val, internal::measure(val)) with length to the end of the buffer which is wrong.

Could you please check?

https://github.com/boostorg/property_tree/blob/29a7f0390b6904e9b7c447d1e6e44442bd0ab17b/include/boost/property_tree/detail/rapidxml.hpp#L2283

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.