summaryrefslogtreecommitdiff
path: root/find_path.c
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>1998-04-06 03:15:39 +0000
committerTodd C. Miller <Todd.Miller@courtesan.com>1998-04-06 03:15:39 +0000
commit5632c730911d3882b8a30ec62a65a0c17e4798b9 (patch)
tree9e2a301c91f139a09f44f6f6671014838612a971 /find_path.c
parent3ffcb6410f38bec43264b4cee0f202cd1d13a13d (diff)
downloadsudo-5632c730911d3882b8a30ec62a65a0c17e4798b9.tar.gz
MAX* + 1 -> MAX*
Diffstat (limited to 'find_path.c')
-rw-r--r--find_path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/find_path.c b/find_path.c
index 1d5fb098c..4e1165939 100644
--- a/find_path.c
+++ b/find_path.c
@@ -94,7 +94,7 @@ extern char *strdup __P((const char *));
char * find_path(file)
char *file; /* file to find */
{
- static char command[MAXPATHLEN + 1]; /* qualified filename */
+ static char command[MAXPATHLEN]; /* qualified filename */
register char *n; /* for traversing path */
char *path = NULL; /* contents of PATH env var */
char *origpath; /* so we can free path later */
@@ -105,7 +105,7 @@ char * find_path(file)
command[0] = '\0';
- if (strlen(file) > MAXPATHLEN) {
+ if (strlen(file) >= MAXPATHLEN) {
errno = ENAMETOOLONG;
(void) fprintf(stderr, "%s: path too long: %s\n", Argv[0], file);
exit(1);