summaryrefslogtreecommitdiff
path: root/src/test/fuzz/fuzz_hsdescv3.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-02-24 07:45:20 -0500
committerNick Mathewson <nickm@torproject.org>2020-02-24 07:45:20 -0500
commitcaa392a73ad6c8e215a4686955c9de98eeb07661 (patch)
tree50de29ea7cbbf27ae656a4b7a865f76c1a66ae63 /src/test/fuzz/fuzz_hsdescv3.c
parent7ba7f9c0de9d1b2435a01961379b3d85c4fc2ab5 (diff)
parent93cb8072becb4213525d08a87fdf7284e6257168 (diff)
downloadtor-caa392a73ad6c8e215a4686955c9de98eeb07661.tar.gz
tor-caa392a73ad6c8e215a4686955c9de98eeb07661.zip
Merge remote-tracking branch 'tor-github/pr/1685/head'
Diffstat (limited to 'src/test/fuzz/fuzz_hsdescv3.c')
-rw-r--r--src/test/fuzz/fuzz_hsdescv3.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/fuzz/fuzz_hsdescv3.c b/src/test/fuzz/fuzz_hsdescv3.c
index 3955241389..8d7eab1a8d 100644
--- a/src/test/fuzz/fuzz_hsdescv3.c
+++ b/src/test/fuzz/fuzz_hsdescv3.c
@@ -85,12 +85,12 @@ int
fuzz_main(const uint8_t *data, size_t sz)
{
hs_descriptor_t *desc = NULL;
- uint8_t subcredential[DIGEST256_LEN];
+ hs_subcredential_t subcredential;
char *fuzzing_data = tor_memdup_nulterm(data, sz);
- memset(subcredential, 'A', sizeof(subcredential));
+ memset(&subcredential, 'A', sizeof(subcredential));
- hs_desc_decode_descriptor(fuzzing_data, subcredential, NULL, &desc);
+ hs_desc_decode_descriptor(fuzzing_data, &subcredential, NULL, &desc);
if (desc) {
log_debug(LD_GENERAL, "Decoding okay");
hs_descriptor_free(desc);
@@ -101,4 +101,3 @@ fuzz_main(const uint8_t *data, size_t sz)
tor_free(fuzzing_data);
return 0;
}
-