summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-29 13:04:08 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-29 15:17:52 +0100
commitc5d961586e72b181b24fcbaf98c8da2fa27aa2d1 (patch)
tree965c235d530218403e997a0f2ccc2fc76e5d902a /source4/ntvfs/posix
parent98dafd5eb1948bbe8a0d78814ab1cd1910477733 (diff)
downloadsamba-c5d961586e72b181b24fcbaf98c8da2fa27aa2d1.tar.gz
samba-c5d961586e72b181b24fcbaf98c8da2fa27aa2d1.tar.bz2
samba-c5d961586e72b181b24fcbaf98c8da2fa27aa2d1.zip
pvfs_resolve: fix endless loop with trailing ".."
We also need to move the NULL termination. metze (This used to be commit 4fc41065a31cc8bd477ff5bf2d89f9f595002227)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index 2bfc47beff..c129038572 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -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;
}