Blob Blame History Raw
From 6fcb3173d64ef8a9d70f8adf19f134a0cd9cf6e8 Mon Sep 17 00:00:00 2001
From: Jeremy Harris <jgh146exb@wizmail.org>
Date: Sun, 11 Feb 2024 15:04:58 +0000
Subject: [PATCH 06/10] use dynamic mem for regex_match_string

---
 src/regex.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/regex.c b/src/src/regex.c
index bb34e5b23..d5dc10258 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -24,8 +24,6 @@ typedef struct pcre_list {
   struct pcre_list *	next;
 } pcre_list;
 
-uschar regex_match_string_buffer[1024];
-
 extern FILE *mime_stream;
 extern uschar *mime_current_boundary;
 
@@ -85,9 +83,7 @@ for (pcre_list * ri = re_list_head; ri; ri = ri->next)
     int save_pool = store_pool;
     store_pool = POOL_PERM;
 
-    Ustrncpy(regex_match_string_buffer, ri->pcre_text,
-	      sizeof(regex_match_string_buffer)-1);
-    regex_match_string = regex_match_string_buffer;
+    regex_match_string = string_copy(ri->pcre_text);
 
     for (int nn = 1; nn < n; nn++)
       {
-- 
2.34.1