From 19f40b8202e9d0ab58f93f7b84a80c2008adfaba Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 15 Oct 2007 03:33:57 +0000 Subject: [PATCH] DEVEL15-windows-pioctl-two-20071014 Two more locations where an intermediary path of length zero should be ignored. (cherry picked from commit 8a50a53fdf1ec2374bb5b68cfa42b6a3aa3ee84c) --- src/WINNT/afsd/cm_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index 3b2b10249..2e77b902d 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -286,7 +286,7 @@ long cm_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp, } lastComponent = strrchr(p, '\\'); - if (lastComponent && strlen(p) > 1) { + if (lastComponent && (p - lastComponent) > 1 &&strlen(p) > 1) { *lastComponent = '\0'; lastComponent++; @@ -333,7 +333,7 @@ long cm_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp, } lastComponent = strrchr(p, '\\'); - if (lastComponent && strlen(p) > 1) { + if (lastComponent && (p - lastComponent) > 1 &&strlen(p) > 1) { *lastComponent = '\0'; lastComponent++; -- 2.39.5