Skip to content

Commit

Permalink
minor fixes (#2023)
Browse files Browse the repository at this point in the history
fixed 'handle leak' in ndpi_load_malicious_sha1_file and removed the redundant comparison ndpi_search_eaq

Co-authored-by: Ivan Kapranov <[email protected]>
  • Loading branch information
koltiradw and Ivan Kapranov authored Jun 22, 2023
1 parent aa25c06 commit 15f0e14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/lib/ndpi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4258,6 +4258,8 @@ int ndpi_load_malicious_sha1_file(struct ndpi_detection_module_struct *ndpi_str,
num++;
}

fclose(fd);

return num;
}

Expand Down
3 changes: 1 addition & 2 deletions src/lib/protocols/eaq.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ static void ndpi_search_eaq(struct ndpi_detection_module_struct *ndpi_struct, st
((sport != EAQ_DEFAULT_PORT) && (dport != EAQ_DEFAULT_PORT)) )
break;

if(packet->udp != NULL) {
u_int32_t seq = (packet->payload[0] * 1000) + (packet->payload[1] * 100) + (packet->payload[2] * 10) + packet->payload[3];

if(flow->l4.udp.eaq_pkt_id == 0)
Expand All @@ -71,7 +70,7 @@ static void ndpi_search_eaq(struct ndpi_detection_module_struct *ndpi_struct, st
return;
} else
return;
}

} while(0);

NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
Expand Down

0 comments on commit 15f0e14

Please sign in to comment.