Turn hs_subcredential_t into a proper struct.

This commit is contained in:
Nick Mathewson
2020-01-16 18:27:25 -05:00
parent 3484608bda
commit 4532c7ef6a
23 changed files with 125 additions and 107 deletions
+3 -4
View File
@@ -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;
}