From: Jeremy Harris Date: Sun, 16 May 2021 12:22:20 +0000 (+0100) Subject: openssl config strings are immutable X-Git-Tag: exim-4.95-RC0~10^2~4 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/1f7081b85e684302c091d8b35226ba3418c03f2b openssl config strings are immutable --- 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);