diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-07-30 00:14:45 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-07-30 00:14:45 -0700 |
commit | 2f865fd3e2cd871387de67394013b1137142357c (patch) | |
tree | 99e0c3db635608336e0864d02dae6c10ceec6b48 /testsp.c | |
parent | 768aeab3232cd3077ffff579ff2d59441c6968ef (diff) | |
download | safepath-2f865fd3e2cd871387de67394013b1137142357c.tar.gz safepath-2f865fd3e2cd871387de67394013b1137142357c.tar.bz2 safepath-2f865fd3e2cd871387de67394013b1137142357c.zip |
Handle consecutive slashes better.
* safepath.c (safepath_check): At the start of an absolute path
and at every component separation, go to the last slash if there
are multiple slashes; do not report multiple slashes as an
invalid path. Also, if a symbolic link target ends with a slash,
then do not add a slash between it and the rest of the path.
We thereby conform to the POSIX requirement that if a link target
consists of nothing but slashes, then those slashes replace the
leading slashes of the rest of the path.
Diffstat (limited to 'testsp.c')
0 files changed, 0 insertions, 0 deletions