From 1f7081b85e684302c091d8b35226ba3418c03f2b Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 16 May 2021 13:22:20 +0100 Subject: [PATCH] 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 9692033f0..4636f3c32 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); -- 2.30.2