diff options
-rw-r--r-- | changes/bug21509 | 3 | ||||
-rw-r--r-- | src/test/fuzz/fuzz_hsdescv3.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/bug21509 b/changes/bug21509 new file mode 100644 index 0000000000..593a01ef20 --- /dev/null +++ b/changes/bug21509 @@ -0,0 +1,3 @@ + o Minor bugfixes (hidden service v3, fuzzing): + - Fix the hidden service v3 descriptor decoding fuzzing to use the latest + decoding API correctly. Fixes bug 21509; bugfix on 0.3.2.1-alpha. diff --git a/src/test/fuzz/fuzz_hsdescv3.c b/src/test/fuzz/fuzz_hsdescv3.c index 3fd21148f4..03c509e2e6 100644 --- a/src/test/fuzz/fuzz_hsdescv3.c +++ b/src/test/fuzz/fuzz_hsdescv3.c @@ -55,10 +55,12 @@ int fuzz_main(const uint8_t *data, size_t sz) { hs_descriptor_t *desc = NULL; + uint8_t subcredential[DIGEST256_LEN]; char *fuzzing_data = tor_memdup_nulterm(data, sz); + memset(subcredential, 'A', sizeof(subcredential)); - hs_desc_decode_descriptor(fuzzing_data, NULL, &desc); + hs_desc_decode_descriptor(fuzzing_data, subcredential, &desc); if (desc) { log_debug(LD_GENERAL, "Decoding okay"); hs_descriptor_free(desc); |