In hash drbg changed assignment to memcpy to fix strict aliasing

warning.
This commit is contained in:
John Safranek
2015-01-06 14:25:57 -08:00
parent a8803e1e16
commit 3c86c16d85

View File

@ -232,7 +232,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;