diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-04 14:28:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-04 14:28:19 -0400 |
commit | 1a03edefbaf2f89489df86519b837b5bf8c5f18f (patch) | |
tree | 52444e0976b0401a782c96baca160c7b77507335 /src/test/test_hs_descriptor.c | |
parent | d16b4b3e485526b39e7bdc36bf2d8041080a7201 (diff) | |
download | tor-1a03edefbaf2f89489df86519b837b5bf8c5f18f.tar.gz tor-1a03edefbaf2f89489df86519b837b5bf8c5f18f.zip |
Fix a heap overrun in test_decode_plaintext
Diffstat (limited to 'src/test/test_hs_descriptor.c')
-rw-r--r-- | src/test/test_hs_descriptor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c index 838d7cdb3d..e406a809bf 100644 --- a/src/test/test_hs_descriptor.c +++ b/src/test/test_hs_descriptor.c @@ -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); |