From: Jeffrey Altman Date: Mon, 15 Oct 2007 03:32:12 +0000 (+0000) Subject: windows-pioctl-two-20071014 X-Git-Tag: BP-openafs-windows-kdfs-ifs~452 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8a50a53fdf1ec2374bb5b68cfa42b6a3aa3ee84c;p=packages%2Fo%2Fopenafs.git windows-pioctl-two-20071014 Two more locations where an intermediary path of length zero should be ignored. --- 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++;