apps/req.c: Increment the right variable when parsing '+'
authorRichard Levitte <levitte@openssl.org>
Mon, 20 Jun 2016 18:07:13 +0000 (20:07 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 20 Jun 2016 18:15:44 +0000 (20:15 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 14d3c0dd2c31b9fd1f92d608524dd650f5ec5a7e)

apps/req.c

index e818bd2976d6db2b0586a079ddea7ac03cc22721..9f1066f61666a47cd895b800feff0d3bf385c944 100644 (file)
@@ -1331,12 +1331,11 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk,
                 break;
             }
 #ifndef CHARSET_EBCDIC
-        if (*p == '+')
+        if (*type == '+')
 #else
-        if (*p == os_toascii['+'])
+        if (*type == os_toascii['+'])
 #endif
-        {
-            p++;
+            type++;
             mval = -1;
         } else
             mval = 0;