summaryrefslogtreecommitdiff
path: root/which.c
diff options
context:
space:
mode:
Diffstat (limited to 'which.c')
-rw-r--r--which.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/which.c b/which.c
index 1d75244..08813c1 100644
--- a/which.c
+++ b/which.c
@@ -53,7 +53,7 @@ extern int which_main(int argc, char **argv)
argv++;
found = 0;
for (i = 0; i < count; i++) {
- char buf[strlen(path_n)+1+strlen(*argv)];
+ char buf[strlen(path_n)+strlen(*argv)+2];
strcpy (buf, path_n);
strcat (buf, "/");
strcat (buf, *argv);