]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-pioctl-20071014
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 14 Oct 2007 06:54:06 +0000 (06:54 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 14 Oct 2007 06:54:06 +0000 (06:54 +0000)
do not parse an intermediary path if the path length is 0

src/WINNT/afsd/cm_ioctl.c

index d492fadbeb17e30734f783fa5a911afbc0e25719..4a490eaf8071702205988fec90f2b4484d49e331 100644 (file)
@@ -347,7 +347,7 @@ long cm_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
        }
         
        lastComponent = strrchr(relativePath, '\\');
-       if (lastComponent && strlen(relativePath) > 1) {
+       if (lastComponent && (relativePath - lastComponent) > 1 && strlen(relativePath) > 1) {
            *lastComponent = '\0';
            lastComponent++;