diff --git a/ChaCha20_DRBG.c b/ChaCha20_DRBG.c index 4e7d370..92d06f0 100755 --- a/ChaCha20_DRBG.c +++ b/ChaCha20_DRBG.c @@ -504,6 +504,8 @@ void ChaCha20_DRBG_Instantiate_algorithm(uint8_t *entropy_input, int nonce, uint8_t *requested_bits; time_t timep; + // 此处memcpy存在堆溢出, + // 有个96字节的写入,错误是在一个66字节区域的正右方进行的写操作 memcpy(seed_material, entropy_input, entropy_input_len); memcpy(seed_material + entropy_input_len, &nonce, sizeof(nonce)); memcpy(seed_material + entropy_input_len + sizeof(nonce),