From 3adb054e5ad13b66111b6af08523e8e06ef490c3 Mon Sep 17 00:00:00 2001 From: wosch Date: Sat, 9 Mar 2002 15:30:42 +0000 Subject: Off by one error in checking max file name length. --- usr.bin/which/which.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/which/which.c') 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; -- cgit v1.1