From: Jeffrey Altman Date: Sun, 14 Oct 2007 06:54:06 +0000 (+0000) Subject: windows-pioctl-20071014 X-Git-Tag: BP-openafs-windows-kdfs-ifs~453 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7504c664028a3df8bbf5ba682c8b39a8fc05aae2;p=packages%2Fo%2Fopenafs.git windows-pioctl-20071014 do not parse an intermediary path if the path length is 0 --- diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index d492fadbe..4a490eaf8 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -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++;