summaryrefslogtreecommitdiffstats
path: root/usr.bin/which/which.c
diff options
context:
space:
mode:
authorwosch <wosch@FreeBSD.org>2002-03-09 15:30:42 +0000
committerwosch <wosch@FreeBSD.org>2002-03-09 15:30:42 +0000
commit3adb054e5ad13b66111b6af08523e8e06ef490c3 (patch)
tree1ce5d94e3dd792e67c2708b5b28f7d33d185ece0 /usr.bin/which/which.c
parentbe9ab922415070d9bac5ca4b76bf73d3b8c4f402 (diff)
downloadFreeBSD-src-3adb054e5ad13b66111b6af08523e8e06ef490c3.zip
FreeBSD-src-3adb054e5ad13b66111b6af08523e8e06ef490c3.tar.gz
Off by one error in checking max file name length.
Diffstat (limited to 'usr.bin/which/which.c')
-rw-r--r--usr.bin/which/which.c2
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;
OpenPOWER on IntegriCloud