diff --git a/crypto/drbg.c b/crypto/drbg.c index b69409cb7e6ac70b6d9ae4c19c469ad7abb684e6..8d2944fab8e84f4e484a1478aac1c16206914938 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -487,7 +487,7 @@ static int drbg_ctr_df(struct drbg_state *drbg, out: memset(iv, 0, drbg_blocklen(drbg)); - memset(temp, 0, drbg_statelen(drbg)); + memset(temp, 0, drbg_statelen(drbg) + drbg_blocklen(drbg)); memset(pad, 0, drbg_blocklen(drbg)); return ret; }