mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-02 00:40:17 +00:00
Extend values saved in hash data structure to u_int64_t (#3013)
Move from `u_int32_t` to `u_int64_t`. We want to be able to save protocol + category + breed in the same entry.
This commit is contained in:
parent
4f18701b99
commit
20892cf4fc
12 changed files with 33 additions and 33 deletions
|
|
@ -9,7 +9,7 @@
|
|||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
FuzzedDataProvider fuzzed_data(data, size);
|
||||
u_int16_t i, rc, num_iteration, data_len, is_added = 0;
|
||||
u_int32_t value32;
|
||||
u_int64_t value64;
|
||||
std::vector<char>value_added;
|
||||
ndpi_str_hash *h = NULL;
|
||||
|
||||
|
|
@ -45,11 +45,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|||
data_len = fuzzed_data.ConsumeIntegralInRange(0, 127);
|
||||
std::vector<char>data = fuzzed_data.ConsumeBytes<char>(data_len);
|
||||
|
||||
ndpi_hash_find_entry(h, data.data(), data.size(), &value32);
|
||||
ndpi_hash_find_entry(h, data.data(), data.size(), &value64);
|
||||
}
|
||||
/* Search of an added entry */
|
||||
if (is_added) {
|
||||
ndpi_hash_find_entry(h, value_added.data(), value_added.size(), &value32);
|
||||
ndpi_hash_find_entry(h, value_added.data(), value_added.size(), &value64);
|
||||
}
|
||||
|
||||
if (fuzzed_data.ConsumeBool())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue