aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/crypto/x509v3/v3_ncons.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/x509v3/v3_ncons.c')
-rw-r--r--crypto/openssl/crypto/x509v3/v3_ncons.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/openssl/crypto/x509v3/v3_ncons.c b/crypto/openssl/crypto/x509v3/v3_ncons.c
index a01dc64dd22e..3b0f1bd1bd0b 100644
--- a/crypto/openssl/crypto/x509v3/v3_ncons.c
+++ b/crypto/openssl/crypto/x509v3/v3_ncons.c
@@ -401,7 +401,7 @@ static int nc_dns(ASN1_IA5STRING *dns, ASN1_IA5STRING *base)
if (dns->length > base->length)
{
dnsptr += dns->length - base->length;
- if (dnsptr[-1] != '.')
+ if (*baseptr != '.' && dnsptr[-1] != '.')
return X509_V_ERR_PERMITTED_VIOLATION;
}