mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
fuzzing: Make hsdescv3 use the decoding API correctly
Fixes #21509 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
4d2de821ce
commit
c4ef21ff5e
3
changes/bug21509
Normal file
3
changes/bug21509
Normal file
@ -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.
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user