From: Jeffrey Altman Date: Mon, 15 Oct 2007 03:33:57 +0000 (+0000) Subject: DEVEL15-windows-pioctl-two-20071014 X-Git-Tag: openafs-devel-1_5_26~34 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=19f40b8202e9d0ab58f93f7b84a80c2008adfaba;p=packages%2Fo%2Fopenafs.git DEVEL15-windows-pioctl-two-20071014 Two more locations where an intermediary path of length zero should be ignored. (cherry picked from commit 8a50a53fdf1ec2374bb5b68cfa42b6a3aa3ee84c) --- 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++;