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:02:05 +0000 (14:02 -0400)
Reviewed-by: Rich Salz <rsalz@akamai.com>
crypto/x509v3/v3_utl.c

index 81227e0..debd807 100644 (file)
@@ -795,7 +795,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.