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

src/WINNT/afsd/cm_ioctl.c

index 4a490eaf8071702205988fec90f2b4484d49e331..805d2ebce8b204ce016df1260dc857e461a723ff 100644 (file)
@@ -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++;