Skip to content

Commit

Permalink
Merge 1912993 from trunk:
Browse files Browse the repository at this point in the history
  *) 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
  • Loading branch information
icing committed Oct 16, 2023
1 parent a9ed7fb commit c41eb3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/core/mod_macro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

2 comments on commit c41eb3b

@chengyechun
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the solution for CVE-2023-31122?

@14NC
Copy link

@14NC 14NC commented on c41eb3b Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the solution for CVE-2023-31122?

@chengyechun yes it is

Please sign in to comment.