This fixes an off-by-one error in CryptState_init() which would
leave the final byte of decrypt_history uninitialized.
void CryptState_init(cryptState_t *cs)
{
void CryptState_init(cryptState_t *cs)
{
- memset(cs->decrypt_history, 0, 0xff);
+ memset(cs->decrypt_history, 0, sizeof(cs->decrypt_history));
memset(cs->raw_key, 0, AES_BLOCK_SIZE);
memset(cs->encrypt_iv, 0, AES_BLOCK_SIZE);
memset(cs->decrypt_iv, 0, AES_BLOCK_SIZE);
memset(cs->raw_key, 0, AES_BLOCK_SIZE);
memset(cs->encrypt_iv, 0, AES_BLOCK_SIZE);
memset(cs->decrypt_iv, 0, AES_BLOCK_SIZE);