On Mon, Sep 13, 2004, Max Karolinskiy wrote: > > Hello, > > After figuring out the size of the buffer needed to convert the internal > structure > into DER, the function allocates that size + 10 : > > b=(unsigned char *)OPENSSL_malloc((unsigned int)i+10); > > Is there any particular reason why 10 is added to the size ? >
That's an ancient function which has been around since the SSLeay days. The reason for that is probably lost in the mists of time... In any case there's no need to do that with the new ASN1 code which always returns the precise size of the structure. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]