correctly encode OIDs near 2^32
authorDr. Stephen Henson <steve@openssl.org>
Wed, 22 Jun 2011 15:15:48 +0000 (15:15 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 22 Jun 2011 15:15:48 +0000 (15:15 +0000)
crypto/asn1/a_object.c

index e5fbe7cbb1042bb80fb1399cb52a1d3ac4f8a55f..0ef0ac3e8981691ce8dd817e45b9d405582083c2 100644 (file)
@@ -139,7 +139,7 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num)
                                ASN1err(ASN1_F_A2D_ASN1_OBJECT,ASN1_R_INVALID_DIGIT);
                                goto err;
                                }
-                       if (!use_bn && l > (ULONG_MAX / 10L))
+                       if (!use_bn && l >= (ULONG_MAX / 10L))
                                {
                                use_bn = 1;
                                if (!bl)