fix github issue #13, DRBG type-punning

This commit is contained in:
John Safranek
2015-02-24 16:47:00 -08:00
parent 787e73d818
commit 795a32446b

View File

@@ -276,7 +276,7 @@ static int Hash_gen(DRBG* drbg, byte* out, word32 outSz, const byte* V)
return DRBG_FAILURE;
}
checkBlock = *(word32*)drbg->digest;
XMEMCPY(&checkBlock, drbg->digest, sizeof(word32));
if (drbg->reseedCtr > 1 && checkBlock == drbg->lastBlock) {
if (drbg->matchCount == 1) {
return DRBG_CONT_FAILURE;