On Wed, Feb 27, 2002 at 11:39:26PM +0000, Tom Cosgrove wrote:

> There's a problem in bntest.c from openssl-0.9.6c.  It appears that
> this revision of the file is still the latest (rev 1.55), at least
> via CVSweb.
> 
> The problem is that there are calls to BN_free() to attempt to free
> BIGNUMs that are not created by BN_new().  These calls presumably
> came about when changing the code to use stack-based automatic
> variables instead of pointers.

I don't see anything wrong with this.  Documented behaviour of
BN_free() is to free the BIGNUM structure only if it has been
created by BN_new().

> The calls to BN_free() should just be deleted.

No.  BN_free() releases the additional data usually allocated during
use of the BIGNUM.  Omitting the calls to BN_free() would lead to
memory leaks.


-- 
Bodo Möller <[EMAIL PROTECTED]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to