From: Sascha Schumann Date: Sun, 27 Aug 2000 09:48:03 +0000 (+0000) Subject: Fix strlcpy use at this place. X-Git-Tag: php-4.0.2~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35a9a1878e5caad6994008a49c121774c62b6e7d;p=php Fix strlcpy use at this place. --- 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, ':');