diff options
author | wosch <wosch@FreeBSD.org> | 2002-03-09 15:30:42 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 2002-03-09 15:30:42 +0000 |
commit | 3adb054e5ad13b66111b6af08523e8e06ef490c3 (patch) | |
tree | 1ce5d94e3dd792e67c2708b5b28f7d33d185ece0 /usr.bin | |
parent | be9ab922415070d9bac5ca4b76bf73d3b8c4f402 (diff) | |
download | FreeBSD-src-3adb054e5ad13b66111b6af08523e8e06ef490c3.zip FreeBSD-src-3adb054e5ad13b66111b6af08523e8e06ef490c3.tar.gz |
Off by one error in checking max file name length.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/which/which.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/which/which.c b/usr.bin/which/which.c index f55871a..cea0ce6 100644 --- a/usr.bin/which/which.c +++ b/usr.bin/which/which.c @@ -86,7 +86,7 @@ main(int argc, char **argv) while (argc > 0) { memcpy(path, p, pathlen); - if (strlen(*argv) > FILENAME_MAX || + if (strlen(*argv) >= FILENAME_MAX || print_matches(path, *argv) == -1) status = EXIT_FAILURE; |