Add some fuzzers to test other data structures. (#1870)
Start using a dictionary for fuzzing (see: https://llvm.org/docs/LibFuzzer.html#dictionaries). Remove some dead code. Fuzzing with debug enabled is not usually a great idea (from performance POV). Keep the code since it might be useful while debugging.
This commit is contained in:
@@ -488,16 +488,12 @@ u_int64_t ndpi_get_bin_value(struct ndpi_bin *b, u_int16_t slot_id) {
|
||||
switch(b->family) {
|
||||
case ndpi_bin_family8:
|
||||
return(b->u.bins8[slot_id]);
|
||||
break;
|
||||
case ndpi_bin_family16:
|
||||
return(b->u.bins16[slot_id]);
|
||||
break;
|
||||
case ndpi_bin_family32:
|
||||
return(b->u.bins32[slot_id]);
|
||||
break;
|
||||
case ndpi_bin_family64:
|
||||
return(b->u.bins64[slot_id]);
|
||||
break;
|
||||
}
|
||||
|
||||
return(0);
|
||||
|
||||
Reference in New Issue
Block a user