1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

pvfs_resolve: fix endless loop with trailing ".."

We also need to move the NULL termination.

metze
(This used to be commit 4fc41065a3)
This commit is contained in:
Stefan Metzmacher 2008-02-29 13:04:08 +01:00
parent 98dafd5eb1
commit c5d961586e

View File

@ -399,7 +399,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
if (ISDOTDOT(components[i])) {
if (i < 1) return NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
memmove(&components[i-1], &components[i+1],
sizeof(char *)*(num_components-(i+1)));
sizeof(char *)*(num_components-i));
i -= 2;
continue;
}