boostorg / boostorg/property_tree
Improve robustness of INI parser by refusing NULL characters
- Dominant language
- C++
- Stars
- 65
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
We are facing a weird issue on Windows, where a file move operation is not atomic: It seems to copy the file and sometimes it produces files that start normally, but then end filled with NULL characters. It looks as if a buffer was prepared, possibly memory mapped and then never filled.
Unfortunately the property_tree ini parser parses such files in many cases. Would it be possible to throw an exception on NULL characters, possibly as an option? Other characters below ASCII 32 excluding CR, LF, TAB may possibly be refused as well.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the INI parser and its existing input-validation tests. Reproduce the issue with an INI file containing NULL characters and check how other control characters are handled. Done means malformed input is rejected with an exception, with coverage for NULL characters and any agreed treatment of other controls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100