fix hash size mismatch on HashSession()

This commit is contained in:
toddouska
2015-03-06 11:33:06 -08:00
parent 874fa8c1f9
commit 7a87ce54ca

View File

@ -5559,7 +5559,7 @@ int wolfSSL_Cleanup(void)
/* some session IDs aren't random afterall, let's make them random */ /* some session IDs aren't random afterall, let's make them random */
static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error) static INLINE word32 HashSession(const byte* sessionID, word32 len, int* error)
{ {
byte digest[MD5_DIGEST_SIZE]; byte digest[MAX_DIGEST_SIZE];
#ifndef NO_MD5 #ifndef NO_MD5
*error = wc_Md5Hash(sessionID, len, digest); *error = wc_Md5Hash(sessionID, len, digest);