From 35a9a1878e5caad6994008a49c121774c62b6e7d Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sun, 27 Aug 2000 09:48:03 +0000 Subject: [PATCH] Fix strlcpy use at this place. --- main/SAPI.c | 4 ++-- 1 file 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, ':'); -- 2.50.1