diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2021-07-11 12:21:54 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-07-11 12:21:54 +0100 |
commit | e8e7fafabffe61077794a2f1e5febd7b96b01116 (patch) | |
tree | 926164fda1e0c15e5eeff95a801f326fcb8994fe /src | |
parent | fbe8578a39505c146223ffcf2c63a5ba8bb0d9a4 (diff) |
GnuTLS: Fix certextract expansion
Diffstat (limited to 'src')
-rw-r--r-- | src/src/tlscert-gnu.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |