cm/filesystem: remove_filename out-of-bounds access under MSYS runtime
The code here and maybe here call .erase()
with a length computed from expressions of the form part.data() - whole.data()
. This assumes that the string_view part
always points inside the whole
. However, that may not be the case in EDIT: This analysis is incorrect. A different get_filename
when using path::iterator::operator--
, which makes a copy of the fragment to return from path::iterator::operator*
.operator*
is used. This may be a bug in CYGWIN/MSYS.
Edited by Brad King