mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Fix a heap overrun in test_decode_plaintext
This commit is contained in:
parent
d16b4b3e48
commit
1a03edefba
@ -987,6 +987,7 @@ test_decode_plaintext(void *arg)
|
||||
tt_int_op(HS_DESC_MAX_LEN, <, big);
|
||||
char *plaintext = tor_malloc_zero(big);
|
||||
memset(plaintext, 'a', big);
|
||||
plaintext[big - 1] = '\0';
|
||||
ret = hs_desc_decode_plaintext(plaintext, &desc_plaintext);
|
||||
tor_free(plaintext);
|
||||
tt_int_op(ret, OP_EQ, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user