Index: head/usr.sbin/mountd/mountd.c =================================================================== --- head/usr.sbin/mountd/mountd.c +++ head/usr.sbin/mountd/mountd.c @@ -3155,9 +3155,9 @@ goto error_exit; } /* back up over the last component */ - while (*cp == '/' && cp > dirp) + while (cp > dirp && *cp == '/') cp--; - while (*(cp - 1) != '/' && cp > dirp) + while (cp > dirp && *(cp - 1) != '/') cp--; if (cp == dirp) { if (debug)