blob: 7ece786c4c25547d7a9885950ba0cf10c6978b1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
--- apc.c.old 2008-03-26 19:22:02.000000000 +0100
+++ apc.c 2008-03-26 19:22:23.000000000 +0100
@@ -331,7 +331,7 @@
/* not: [no active file] or no path */
memcpy(fileinfo->fullpath, exec_fname, exec_fname_length);
fileinfo->fullpath[exec_fname_length] = DEFAULT_SLASH;
- strcpy(fileinfo->fullpath +exec_fname_length +1, filename);
+ strlcpy(fileinfo->fullpath +exec_fname_length +1, filename,sizeof(fileinfo->fullpath)-exec_fname_length-1);
/* apc_wprint("filename: %s, exec_fname: %s, fileinfo->fullpath: %s", filename, exec_fname, fileinfo->fullpath); */
if (apc_stat(fileinfo->fullpath, &fileinfo->st_buf) == 0) {
found = 1;
|