aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_voting_flags.c
diff options
context:
space:
mode:
authorKris Katterjohn <katterjohn@gmail.com>2018-12-23 17:46:08 -0600
committerKris Katterjohn <katterjohn@gmail.com>2018-12-23 17:46:08 -0600
commitc11247e957ae8e3fb253aac86196dcef13dac92c (patch)
treee8c26120c6e0cda234904c98f7188c9744691a2f /src/test/test_voting_flags.c
parent99713b176b3713c3960be7b2852ffdb301daa916 (diff)
downloadtor-c11247e957ae8e3fb253aac86196dcef13dac92c.tar.gz
tor-c11247e957ae8e3fb253aac86196dcef13dac92c.zip
Fix a buffer overflow in setup_cfg() in src/test/test_voting_flags.c
signed_descriptor_digest has a length of DIGEST_LEN but the memset used to fill it used DIGEST256_LEN. Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
Diffstat (limited to 'src/test/test_voting_flags.c')
-rw-r--r--src/test/test_voting_flags.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_voting_flags.c b/src/test/test_voting_flags.c
index 0c4cedb516..c4c4c7354e 100644
--- a/src/test/test_voting_flags.c
+++ b/src/test/test_voting_flags.c
@@ -35,7 +35,7 @@ setup_cfg(flag_vote_test_cfg_t *c)
strlcpy(c->expected.nickname, "testing100", sizeof(c->expected.nickname));
memset(c->ri.cache_info.identity_digest, 0xff, DIGEST_LEN);
- memset(c->ri.cache_info.signed_descriptor_digest, 0xee, DIGEST256_LEN);
+ memset(c->ri.cache_info.signed_descriptor_digest, 0xee, DIGEST_LEN);
c->ri.cache_info.published_on = c->now - 100;
c->expected.published_on = c->now - 100;