From e8e7fafabffe61077794a2f1e5febd7b96b01116 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 11 Jul 2021 12:21:54 +0100 Subject: GnuTLS: Fix certextract expansion --- src/src/tlscert-gnu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/src/tlscert-gnu.c b/src/src/tlscert-gnu.c index a09fda0b9..8ea702354 100644 --- a/src/src/tlscert-gnu.c +++ b/src/src/tlscert-gnu.c @@ -288,13 +288,13 @@ uschar * tag = US""; uschar * ele; int match = -1; -while (mod) +if (mod) while (*mod) { if (*mod == '>' && *++mod) sep = *mod++; - else if (Ustrcmp(mod, "dns")==0) { match = GNUTLS_SAN_DNSNAME; mod += 3; } - else if (Ustrcmp(mod, "uri")==0) { match = GNUTLS_SAN_URI; mod += 3; } - else if (Ustrcmp(mod, "mail")==0) { match = GNUTLS_SAN_RFC822NAME; mod += 4; } - else continue; + else if (Ustrncmp(mod, "dns", 3)==0) { match = GNUTLS_SAN_DNSNAME; mod += 3; } + else if (Ustrncmp(mod, "uri", 3)==0) { match = GNUTLS_SAN_URI; mod += 3; } + else if (Ustrncmp(mod, "mail", 4)==0) { match = GNUTLS_SAN_RFC822NAME; mod += 4; } + else break; if (*mod++ != ',') break; -- cgit v1.2.3