From d2e6937a56bfb4b3035420d4fe06d14a9cd069a3 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 14 Oct 2007 06:55:07 +0000 Subject: [PATCH] DEVEL15-windows-pioctl-20071014 do not parse an intermediary path if the path length is 0 (cherry picked from commit 7504c664028a3df8bbf5ba682c8b39a8fc05aae2) --- src/WINNT/afsd/cm_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index dd5c24175..3b2b10249 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -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++; -- 2.39.5