[exim-cvs] use dynamic mem for regex_match_string

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Exim Git Commits Mailing List
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] use dynamic mem for regex_match_string
Gitweb: https://git.exim.org/exim.git/commitdiff/6fcb3173d64ef8a9d70f8adf19f134a0cd9cf6e8
Commit:     6fcb3173d64ef8a9d70f8adf19f134a0cd9cf6e8
Parent:     84add256b3467cf6e0d4a2edf72cf5bf16cd9306
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Feb 11 15:04:58 2024 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Feb 11 15:04:58 2024 +0000


    use dynamic mem for regex_match_string
---
 src/src/regex.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)


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++)
       {


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/