Fix 0 -> NULL, indentation
authorFdaSilvaYY <fdasilvayy@gmail.com>
Thu, 10 Nov 2016 00:22:17 +0000 (01:22 +0100)
committerRich Salz <rsalz@openssl.org>
Tue, 28 Mar 2017 20:21:26 +0000 (16:21 -0400)
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3066)
(cherry picked from commit a6ac1ed686346d2164c16446624c973e51d3ae92)

crypto/asn1/a_int.c
crypto/asn1/asn1_par.c

index e0bcd6e502031ecf27c8828f19b42f6f78f01782..c40c7faed2cf8f6c2d727d83cf2301f9b0f29a07 100644 (file)
@@ -522,7 +522,7 @@ static BIGNUM *asn1_string_to_bn(const ASN1_INTEGER *ai, BIGNUM *bn,
     }
 
     ret = BN_bin2bn(ai->data, ai->length, bn);
-    if (ret == 0) {
+    if (ret == NULL) {
         ASN1err(ASN1_F_ASN1_STRING_TO_BN, ASN1_R_BN_LIB);
         return NULL;
     }
index 4db3df9b8d3e58507854f5105cce308adf48dee6..af045cb15ef2469808706b5ffa03420322e37af2 100644 (file)
@@ -79,8 +79,8 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length,
     int dump_indent, dump_cont = 0;
 
     if (depth > ASN1_PARSE_MAXDEPTH) {
-            BIO_puts(bp, "BAD RECURSION DEPTH\n");
-            return 0;
+        BIO_puts(bp, "BAD RECURSION DEPTH\n");
+        return 0;
     }
 
     dump_indent = 6;            /* Because we know BIO_dump_indent() */