]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) mod_macro: use our own strncmp function
authorStefan Eissing <icing@apache.org>
Mon, 16 Oct 2023 06:38:32 +0000 (06:38 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 16 Oct 2023 06:38:32 +0000 (06:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912993 13f79535-47bb-0310-9956-ffa450edef68

modules/core/mod_macro.c

index cbb5a29634da161294589b3b2de529e0220f397b..544a287196ab88e60f25c58638c2a53f6e6b20a0 100644 (file)
@@ -483,7 +483,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) {