path_conv: When encountering a ".(/)+" sequence, skip *all* slashes
The original code only skipped the "./", but missed to test if more trailing slashes are present. This in turn leads to invalid conversion. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
a43e81e233
commit
f0ae353a4f
@ -1406,7 +1406,12 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
|
|||||||
/* Ignore "./". */
|
/* Ignore "./". */
|
||||||
else if (src[0] == '.' && isdirsep (src[1])
|
else if (src[0] == '.' && isdirsep (src[1])
|
||||||
&& (src == src_start || isdirsep (src[-1])))
|
&& (src == src_start || isdirsep (src[-1])))
|
||||||
|
{
|
||||||
src += 2;
|
src += 2;
|
||||||
|
/* Skip /'s to the next path component. */
|
||||||
|
while (isdirsep (*src))
|
||||||
|
src++;
|
||||||
|
}
|
||||||
|
|
||||||
/* Backup if "..". */
|
/* Backup if "..". */
|
||||||
else if (src[0] == '.' && src[1] == '.'
|
else if (src[0] == '.' && src[1] == '.'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user