cvs: /php4 fopen-wrappers.c
| From: | Andi Gutmans | Date: | Fri, 10 Mar 2000 18:19:38 +0000 |
| Subject: | cvs: /php4 fopen-wrappers.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-11884@lists.php.net to get a copy of this message | ||
andi Fri Mar 10 10:19:38 2000 EDT
Modified files:
/php4 fopen-wrappers.c
Log:
- Use strlcpy() insted of strcpy()
Index: php4/fopen-wrappers.c
diff -u php4/fopen-wrappers.c:1.44 php4/fopen-wrappers.c:1.45
--- php4/fopen-wrappers.c:1.44 Sat Feb 26 21:22:48 2000
+++ php4/fopen-wrappers.c Fri Mar 10 10:19:08 2000
@@ -16,7 +16,7 @@
| Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.c,v 1.44 2000/02/27 05:22:48 andi Exp $ */
+/* $Id: fopen-wrappers.c,v 1.45 2000/03/10 18:19:08 andi Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -100,7 +100,7 @@
SG(request_info).path_translated &&
*SG(request_info).path_translated
) {
- strcpy(local_open_basedir, SG(request_info).path_translated);
+ strlcpy(local_open_basedir, SG(request_info).path_translated, sizeof(local_open_basedir));
local_open_basedir_pos = strlen(local_open_basedir) - 1;
/* Strip filename */
@@ -116,7 +116,7 @@
}
} else {
/* Else use the unmodified path */
- strcpy(local_open_basedir, basedir);
+ strlcpy(local_open_basedir, basedir, sizeof(local_open_basedir));
}
/* Resolve the real path into resolved_name */
@@ -578,7 +578,7 @@
}
if (!strncasecmp(tmp_line, "Location: ", 10)) {
- strcpy(location, tmp_line + 10);
+ strlcpy(location, tmp_line + 10, sizeof(location));
}
if (tmp_line[0] == '\0') {