summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-08-27 09:48:03 +0000
committerSascha Schumann <sas@php.net>2000-08-27 09:48:03 +0000
commit35a9a1878e5caad6994008a49c121774c62b6e7d (patch)
tree06ab6037eaab603e218f5467f5473e313e5933c1 /main
parent2eb8688f29af3c876c0fb62f482f6d76350a41b5 (diff)
downloadphp-git-35a9a1878e5caad6994008a49c121774c62b6e7d.tar.gz
Fix strlcpy use at this place.
Diffstat (limited to 'main')
-rw-r--r--main/SAPI.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 95adcc9e68..14ddf856c5 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -415,8 +415,8 @@ SAPI_API int sapi_add_header(char *header_line, uint header_line_len, zend_bool
if (newlen != 0) {
newlen += sizeof("Content-type: ");
newheader = emalloc(newlen);
- strlcpy(newheader, "Content-type: ", newlen);
- strlcpy(newheader, mimetype, newlen);
+ PHP_STRLCPY(newheader, "Content-type: ", newlen, sizeof("Content-type: ")-1);
+ strlcat(newheader, mimetype, newlen);
sapi_header.header = newheader;
sapi_header.header_len = newlen - 1;
colon_offset = strchr(newheader, ':');