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

(cherry picked from commit 7504c664028a3df8bbf5ba682c8b39a8fc05aae2)

src/WINNT/afsd/cm_ioctl.c

index dd5c24175351655d59cb51dcf03b47e27acbeefb..3b2b10249d8c1835313d0009e8b3b0087d55545a 100644 (file)
@@ -365,7 +365,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++;