mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Fix bug 8845: check the right length of memory in aes unit tests
This couldn't actually be a buffer overrun unless AES somehow turned into memcpy, but still it's good to fix it.
This commit is contained in:
parent
a1d7f7ea50
commit
7d3fd85838
3
changes/bug8845
Normal file
3
changes/bug8845
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes (test):
|
||||
- Fix an impossible buffer overrun in the AES unit tests. Fixes bug 8845;
|
||||
bugfix on 0.2.0.7-alpha. Found by eugenis.
|
@ -730,7 +730,7 @@ test_crypto_aes_iv(void *arg)
|
||||
/* Decrypt with the wrong key. */
|
||||
decrypted_size = crypto_cipher_decrypt_with_iv(key2, decrypted2, 4095,
|
||||
encrypted1, encrypted_size);
|
||||
test_memneq(plain, decrypted2, encrypted_size);
|
||||
test_memneq(plain, decrypted2, decrypted_size);
|
||||
/* Alter the initialization vector. */
|
||||
encrypted1[0] += 42;
|
||||
decrypted_size = crypto_cipher_decrypt_with_iv(key1, decrypted1, 4095,
|
||||
|
Loading…
Reference in New Issue
Block a user