From: Jeffrey Altman Date: Sun, 14 Oct 2007 06:55:07 +0000 (+0000) Subject: DEVEL15-windows-pioctl-20071014 X-Git-Tag: openafs-devel-1_5_26~35 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d2e6937a56bfb4b3035420d4fe06d14a9cd069a3;p=packages%2Fo%2Fopenafs.git DEVEL15-windows-pioctl-20071014 do not parse an intermediary path if the path length is 0 (cherry picked from commit 7504c664028a3df8bbf5ba682c8b39a8fc05aae2) --- 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++;