[exim-cvs] openssl config strings are immutable

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] openssl config strings are immutable
Gitweb: https://git.exim.org/exim.git/commitdiff/1f7081b85e684302c091d8b35226ba3418c03f2b
Commit:     1f7081b85e684302c091d8b35226ba3418c03f2b
Parent:     d21db862df4dff3a73fb4bb4adb9d3e2bfa5c57e
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun May 16 13:22:20 2021 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Mon Jun 28 00:30:02 2021 +0100


    openssl config strings are immutable
---
 src/src/tls-openssl.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)


diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 9692033..4636f3c 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -4529,7 +4529,6 @@ tls_openssl_options_parse(uschar *option_spec, long *results)
{
long result, item;
uschar * exp, * end;
-uschar keep_c;
BOOL adding, item_parsed;

 /* Server: send no (<= TLS1.2) session tickets */
@@ -4571,11 +4570,8 @@ for (uschar * s = exp; *s; /**/)
     return FALSE;
     }
   adding = *s++ == '+';
-  for (end = s; (*end != '\0') && !isspace(*end); ++end) /**/ ;
-  keep_c = *end;
-  *end = '\0';
-  item_parsed = tls_openssl_one_option_parse(s, &item);
-  *end = keep_c;
+  for (end = s; *end && !isspace(*end); ) end++;
+  item_parsed = tls_openssl_one_option_parse(string_copyn(s, end-s), &item);
   if (!item_parsed)
     {
     DEBUG(D_tls) debug_printf("openssl option setting unrecognised: \"%s\"\n", s);