]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-pioctl-two-20071014
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 15 Oct 2007 03:33:57 +0000 (03:33 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 15 Oct 2007 03:33:57 +0000 (03:33 +0000)
Two more locations where an intermediary path of length zero should
be ignored.

(cherry picked from commit 8a50a53fdf1ec2374bb5b68cfa42b6a3aa3ee84c)

src/WINNT/afsd/cm_ioctl.c

index 3b2b10249d8c1835313d0009e8b3b0087d55545a..2e77b902d2287007cf1c498e94379d4543f862c9 100644 (file)
@@ -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++;