Fix a slightly confusing if condition in a2i_ASN1_INTEGER.
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 15 Feb 2017 19:01:53 +0000 (20:01 +0100)
committerRich Salz <rsalz@openssl.org>
Fri, 17 Feb 2017 14:54:25 +0000 (09:54 -0500)
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2640)

crypto/asn1/f_int.c

index 51fc884b5eb5077647106745c5432694ac64ec2b..ec556c92dcb1e9dad4b3d39b511deca39b2a4092 100644 (file)
@@ -103,7 +103,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
         bufp = (unsigned char *)buf;
         if (first) {
             first = 0;
-            if ((bufp[0] == '0') && (buf[1] == '0')) {
+            if ((bufp[0] == '0') && (bufp[1] == '0')) {
                 bufp += 2;
                 i -= 2;
             }