remove hmac array initializers to 0 when non full because of reported compiler weirdness from user

pull/1/head
toddouska 2012-12-14 16:47:03 -08:00
parent f82324a081
commit b25061844c
2 changed files with 4 additions and 2 deletions

View File

@ -3581,10 +3581,11 @@ static void Hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz,
Sha sha;
/* data */
byte seq[SEQ_SZ] = { 0x00, 0x00, 0x00, 0x00 };
byte seq[SEQ_SZ];
byte conLen[ENUM_LEN + LENGTH_SZ]; /* content & length */
const byte* macSecret = GetMacSecret(ssl, verify);
XMEMSET(seq, 0, SEQ_SZ);
conLen[0] = (byte)content;
c16toa((word16)sz, &conLen[ENUM_LEN]);
c32toa(GetSEQIncrement(ssl, verify), &seq[sizeof(word32)]);

View File

@ -401,11 +401,12 @@ void TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz,
int content, int verify)
{
Hmac hmac;
byte seq[SEQ_SZ] = { 0x00, 0x00, 0x00, 0x00 };
byte seq[SEQ_SZ];
byte length[LENGTH_SZ];
byte inner[ENUM_LEN + VERSION_SZ + LENGTH_SZ]; /* type + version +len */
int type;
XMEMSET(seq, 0, SEQ_SZ);
c16toa((word16)sz, length);
#ifdef CYASSL_DTLS
if (ssl->options.dtls)