summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/x509v3/v3_ncons.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_ncons.c b/src/lib/libcrypto/x509v3/v3_ncons.c
index d22ca5e9cd..4913135cf9 100644
--- a/src/lib/libcrypto/x509v3/v3_ncons.c
+++ b/src/lib/libcrypto/x509v3/v3_ncons.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_ncons.c,v 1.12 2017/05/02 04:11:08 deraadt Exp $ */ 1/* $OpenBSD: v3_ncons.c,v 1.13 2017/07/20 19:45:08 tedu Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -457,7 +457,7 @@ nc_dns(ASN1_IA5STRING *dns, ASN1_IA5STRING *base)
457 */ 457 */
458 if (dns->length > base->length) { 458 if (dns->length > base->length) {
459 dnsptr += dns->length - base->length; 459 dnsptr += dns->length - base->length;
460 if (dnsptr[-1] != '.') 460 if (baseptr[0] != '.' && dnsptr[-1] != '.')
461 return X509_V_ERR_PERMITTED_VIOLATION; 461 return X509_V_ERR_PERMITTED_VIOLATION;
462 } 462 }
463 463