fuzz: some enhancements (#1827)
Load some custom configuration (like in the unit tests) and factorize some (fuzzing) common code. There is no way to pass file paths to the fuzzers as parameters. The safe solution seems to be to load them from the process working dir. Anyway, missing file is not a blocking error. Remove some dead code (found looking at the coverage report)
This commit is contained in:
@@ -30,11 +30,8 @@ static void ndpi_check_lotus_notes(struct ndpi_detection_module_struct *ndpi_str
|
||||
struct ndpi_flow_struct *flow)
|
||||
{
|
||||
struct ndpi_packet_struct *packet = &ndpi_struct->packet;
|
||||
// const u_int8_t *packet_payload = packet->payload;
|
||||
u_int32_t payload_len = packet->payload_packet_len;
|
||||
|
||||
if(packet->tcp == NULL) return;
|
||||
|
||||
flow->l4.tcp.lotus_notes_packet_id++;
|
||||
|
||||
if((flow->l4.tcp.lotus_notes_packet_id == 1) &&
|
||||
@@ -58,9 +55,7 @@ void ndpi_search_lotus_notes(struct ndpi_detection_module_struct *ndpi_struct, s
|
||||
{
|
||||
NDPI_LOG_DBG(ndpi_struct, "search lotus_notes\n");
|
||||
|
||||
/* skip marked packets */
|
||||
if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_LOTUS_NOTES)
|
||||
ndpi_check_lotus_notes(ndpi_struct, flow);
|
||||
ndpi_check_lotus_notes(ndpi_struct, flow);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user