Remove incorrect assert.
authorRichard Levitte <levitte@openssl.org>
Fri, 29 Nov 2002 15:18:28 +0000 (15:18 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 29 Nov 2002 15:18:28 +0000 (15:18 +0000)
PR: 360

crypto/dsa/dsa_lib.c

index 9fe002cb0adb8c3854cc89a902817476d1ac3e96..579f73f869f0b38184e78ee7bb0f0920ca5ecba0 100644 (file)
@@ -224,11 +224,13 @@ int DSA_size(const DSA *r)
        {
        int ret,i;
        ASN1_INTEGER bs;
-       unsigned char buf[4];
+       unsigned char buf[4];   /* 4 bytes looks really small.
+                                  However, i2d_ASN1_INTEGER() will not look
+                                  beyond the first byte, as long as the second
+                                  parameter is NULL. */
 
        i=BN_num_bits(r->q);
        bs.length=(i+7)/8;
-       OPENSSL_assert(bs.length <= sizeof buf);
        bs.data=buf;
        bs.type=V_ASN1_INTEGER;
        /* If the top bit is set the asn1 encoding is 1 larger. */