From: Stefan Eissing Date: Mon, 16 Oct 2023 06:39:44 +0000 (+0000) Subject: Merge 1912993 from trunk: X-Git-Tag: 2.4.58-rc1-candidate~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c41eb3b14a3d1eb2e3c42c4728cc52a22748851a;p=thirdparty%2Fapache%2Fhttpd.git Merge 1912993 from trunk: *) mod_macro: use our own strncmp function git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1912994 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/core/mod_macro.c b/modules/core/mod_macro.c index 04af43b3924..cc42d0b0dc1 100644 --- a/modules/core/mod_macro.c +++ b/modules/core/mod_macro.c @@ -465,7 +465,7 @@ static const char *process_content(apr_pool_t * pool, for (i = 0; i < contents->nelts; i++) { const char *errmsg; /* copy the line and substitute macro parameters */ - strncpy(line, ((char **) contents->elts)[i], MAX_STRING_LEN - 1); + apr_cpystrn(line, ((char **) contents->elts)[i], MAX_STRING_LEN); errmsg = substitute_macro_args(line, MAX_STRING_LEN, macro, replacements, used); if (errmsg) {