'/', plus the size of the test command. It did not account for the terminating
NULL, which overwrote the end of the string.
-Erik
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);
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);