diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-29 15:18:22 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-29 15:18:22 +0000 |
commit | e9b553dac11380fb80179340097f990143715553 (patch) | |
tree | f39cf9c27278cbc56f08b8fdad0027ed5f12898b /crypto/dsa/dsa_lib.c | |
parent | db3758923b4db690feb6ca64562d21cc3d1f3abe (diff) |
Remove incorrect assert.
PR: 360
Diffstat (limited to 'crypto/dsa/dsa_lib.c')
-rw-r--r-- | crypto/dsa/dsa_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c index 9fe002cb0a..579f73f869 100644 --- a/crypto/dsa/dsa_lib.c +++ b/crypto/dsa/dsa_lib.c @@ -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. */ |