From: Jeremy Harris Date: Sun, 11 Feb 2024 15:04:58 +0000 (+0000) Subject: use dynamic mem for regex_match_string X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/6fcb3173d64ef8a9d70f8adf19f134a0cd9cf6e8 use dynamic mem for regex_match_string --- diff --git a/src/src/regex.c b/src/src/regex.c index bb34e5b23..d5dc10258 100644 --- a/src/src/regex.c +++ b/src/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++) {