boostorg / wave

Boost.org wave module
http://boost.org/libs/wave
21 stars 49 forks source link

Use correct string constructor for non-null-terminated range #204

Closed jefftrull closed 8 months ago

jefftrull commented 8 months ago

There is no guarantee (indeed, it is unlikely) that data within the scanner buffer will be null terminated and so the constructor that accepts a pointer and a count is appropriate.

This is one of the issues revealed by the BOOST_WAVE_BSIZE variation experiment

jefftrull commented 8 months ago

t_5_001 reveals this bug with BOOST_WAVE_BSIZE=43 and the address sanitizer turned on