29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
From c41eb3b14a3d1eb2e3c42c4728cc52a22748851a Mon Sep 17 00:00:00 2001
|
|
From: Stefan Eissing <icing@apache.org>
|
|
Date: Mon, 16 Oct 2023 06:39:44 +0000
|
|
Subject: [PATCH] mod_macro: out of bounds Read
|
|
|
|
Conflict:NA
|
|
Reference:https://github.com/apache/httpd/commit/c41eb3b14a3d1eb2e3c42c4728cc52a22748851a
|
|
|
|
---
|
|
modules/core/mod_macro.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/modules/core/mod_macro.c b/modules/core/mod_macro.c
|
|
index 04af43b..cc42d0b 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) {
|
|
--
|
|
2.23.0
|
|
|