]> granicus.if.org Git - php/commitdiff
Fix strlcpy use at this place.
authorSascha Schumann <sas@php.net>
Sun, 27 Aug 2000 09:48:03 +0000 (09:48 +0000)
committerSascha Schumann <sas@php.net>
Sun, 27 Aug 2000 09:48:03 +0000 (09:48 +0000)
main/SAPI.c

index 95adcc9e68c12d51d1fe0e07add6fc34f11d4678..14ddf856c582d0a17ed6abe296f55fe9a1fdd2eb 100644 (file)
@@ -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, ':');