1 diff -urN installwatch-0.6.3.ori/installwatch.c installwatch-0.6.3/installwatch.c
2 --- installwatch-0.6.3.ori/installwatch.c 2004-08-30 14:47:35.917768321 +0000
3 +++ installwatch-0.6.3/installwatch.c 2004-08-30 14:51:30.568600728 +0000
6 count = vsnprintf(buffer, BUFSIZE, format, ap);
9 + buffer [BUFSIZE - 2] = '\n';
10 + buffer [BUFSIZE - 1] = 0;
13 /* The buffer was not big enough */
14 strcpy(&(buffer[BUFSIZE - 5]), "...\n");
18 + count = strlen(buffer);
20 if((logname = getenv("INSTALLWATCHFILE"))) {
21 logfd = true_open(logname, O_WRONLY | O_CREAT | O_APPEND, 0666);
24 * to the current working directory if it was not
26 getcwd(resolved_path, MAXPATHLEN - 2);
27 + resolved_path[MAXPATHLEN - 2] = 0;
28 strcat(resolved_path, "/");
29 - strncat(resolved_path, path, MAXPATHLEN - 1);
30 + strncat(resolved_path, path, MAXPATHLEN - 1 - strlen(resolved_path));