提交 e9b553da 编写于 作者: R Richard Levitte

Remove incorrect assert.

PR: 360
上级 db375892
...@@ -224,11 +224,13 @@ int DSA_size(const DSA *r) ...@@ -224,11 +224,13 @@ int DSA_size(const DSA *r)
{ {
int ret,i; int ret,i;
ASN1_INTEGER bs; 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); i=BN_num_bits(r->q);
bs.length=(i+7)/8; bs.length=(i+7)/8;
OPENSSL_assert(bs.length <= sizeof buf);
bs.data=buf; bs.data=buf;
bs.type=V_ASN1_INTEGER; bs.type=V_ASN1_INTEGER;
/* If the top bit is set the asn1 encoding is 1 larger. */ /* If the top bit is set the asn1 encoding is 1 larger. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册