From: [EMAIL PROTECTED]

son> RSA *d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length);
son> 
son> pp should be an in parameter,  but the M_ASN1_D2I_Finish_2(a)
son> modifies it (see line 94 in crypto/asn1/asn1_mac.h)

This is correct behavior.  All d2i functions are supposed to work that
way.  This enables you to call one d2i after the other on a buffer.

son> this is a memory leak and will core dump when calling free(pp).

Nope.  But you found out how to cope correctly with that, I see.

-- 
Richard Levitte   \ Spannv�gen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken   \ S-168 35  BROMMA  \ T: +46-8-26 52 47
Redakteur@Stacken   \      SWEDEN       \ or +46-709-50 36 10
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, Celo Communications: http://www.celocom.com/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to