projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9280fa
)
Initialize final byte of cryptState_t::decrypt_history, too.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 1 Jan 2018 11:18:58 +0000
(12:18 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 1 Jan 2018 18:13:00 +0000
(19:13 +0100)
This fixes an off-by-one error in CryptState_init() which would
leave the final byte of decrypt_history uninitialized.
src/crypt.c
patch
|
blob
|
history
diff --git
a/src/crypt.c
b/src/crypt.c
index 4b1b4f4261af769c09cb7b741eb6c6b29ac5b64d..b5e07b1d594db17f8562817f7a809170d5b13c77 100644
(file)
--- a/
src/crypt.c
+++ b/
src/crypt.c
@@
-52,7
+52,7
@@
static void CryptState_ocb_decrypt(cryptState_t *cs, const unsigned char *encryp
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);