Thanks for the clarification. Mea culpa. It turns out I was looking at bntest.c from OpenSSL and bn_lib.c from an old SSLeay version.
(The background is that I have been brought into a project that uses some of the BN code, and I wanted to add test suites. So I brought in the OpenSSL bntest.c but had problems. Of course, the BN code had been taken from an old SSLeay, not OpenSSL.) Sorry to waste your time... thanks for being so nice about it Tom Cosgrove >>> Bodo Moeller 1-Mar-02 13:45 >>> 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]
