From c4ef21ff5eff26182428d388e0614b4f0c5eed58 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 26 Oct 2017 09:52:15 -0400 Subject: fuzzing: Make hsdescv3 use the decoding API correctly Fixes #21509 Signed-off-by: David Goulet --- src/test/fuzz/fuzz_hsdescv3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/test') 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); -- cgit v1.2.3-54-g00ecf