In message <[EMAIL PROTECTED]> on Mon, 28 Oct 2002 
15:18:37 -0800 (PST), Fiel Cabral <[EMAIL PROTECTED]> said:

unix4aliving> Can the first parameter to MD5_Final be NULL?
unix4aliving> 
unix4aliving> MD5_Final(NULL, c);

Well, it can, but the result will be a big KABOOM, also called
"SIGSEGV" or something similar.

unix4aliving> The manpage does not describe this case.

I dunno about that.  This is a portion of md5.pod:

 MD2_Final() places the message digest in B<md>, which must have space
 for MD2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MD2_CTX>.

 MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and
 MD5_Final() are analogous using an B<MD4_CTX> and B<MD5_CTX> structure.

Note how, among others, MD5_Final basically refers back to MD2_Final?
And MD2_Final requires that md has the space for 16 bytes of output,
that seems pretty clear to me.  Since NULL doesn't point at 16 bytes
of output, the behavior would, at best, be undefined.  I'd expect that
big KABOOM if I were you...

-- 
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
                    \      SWEDEN       \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

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
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to