diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2021-05-16 13:22:20 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-06-28 00:30:02 +0100 |
commit | 1f7081b85e684302c091d8b35226ba3418c03f2b (patch) | |
tree | cf24af9b305039ce189b08ee61c1ba2917f280ce | |
parent | d21db862df4dff3a73fb4bb4adb9d3e2bfa5c57e (diff) |
openssl config strings are immutable
-rw-r--r-- | src/src/tls-openssl.c | 8 |
1 files 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); |