Fix typo in valid_star
authorViktor Dukhovni <openssl-users@dukhovni.org>
Thu, 7 May 2015 17:43:36 +0000 (13:43 -0400)
committerViktor Dukhovni <openssl-users@dukhovni.org>
Thu, 7 May 2015 18:00:38 +0000 (14:00 -0400)
Reviewed-by: Rich Salz <rsalz@akamai.com>
crypto/x509v3/v3_utl.c

index ed6099e120b2610e6a450022fe0c9ab51b43bb66..e73a7a9c5691c80a1014141bd7a1e2e86fcd1433 100644 (file)
@@ -807,7 +807,7 @@ static const unsigned char *valid_star(const unsigned char *p, size_t len,
          */
         if (p[i] == '*') {
             int atstart = (state & LABEL_START);
-            int atend = (i == len - 1 || p[i + i] == '.');
+            int atend = (i == len - 1 || p[i + 1] == '.');
             /*-
              * At most one wildcard per pattern.
              * No wildcards in IDNA labels.