mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Turn hs_subcredential_t into a proper struct.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user