From 8a50a53fdf1ec2374bb5b68cfa42b6a3aa3ee84c Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 15 Oct 2007 03:32:12 +0000 Subject: [PATCH] windows-pioctl-two-20071014 Two more locations where an intermediary path of length zero should be ignored. --- 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 4a490eaf8..805d2ebce 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -268,7 +268,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++; @@ -315,7 +315,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