diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-10-13 00:55:48 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-10-13 01:28:07 -0400 |
commit | 481006fd8887b80c4f794085179047e28102b01a (patch) | |
tree | 88d0d14996530069c6c4116cb73a9d40b0465ac0 /src/math/s390x | |
parent | d44b07fc904f6a0d31ba025f3e9f423c1e47547e (diff) | |
download | musl-481006fd8887b80c4f794085179047e28102b01a.tar.gz musl-481006fd8887b80c4f794085179047e28102b01a.tar.bz2 musl-481006fd8887b80c4f794085179047e28102b01a.tar.xz musl-481006fd8887b80c4f794085179047e28102b01a.zip |
allow escaped path-separator slashes in glob
previously (before and after rewrite), spurious escaping of path
separators as \/ was not treated the same as /, but rather got split
as an unpaired \ at the end of the fnmatch pattern and an unescaped /,
resulting in a mismatch/error.
for the case of \/ as part of the maximal literal prefix, remove the
explicit rejection of it and move the handling of / below escape
processing.
for the case of \/ after a proper glob pattern, it's hard to parse the
pattern, so don't. instead cheat and count repetitions of \ prior to
the already-found / character. if there are an odd number, the last is
escaping the /, so back up the split position by one. now the
char clobbered by null termination is variable, so save it and restore
as needed.
Diffstat (limited to 'src/math/s390x')
0 files changed, 0 insertions, 0 deletions