-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid code in ndpi_util.c #364
Comments
The function get_ndpi_flow_info always returns NULL value for fragmented packets because of following code at line 222 in ndpi_util.c if((iph->ihl * 4) > ipsize || ipsize < ntohs(iph->tot_len) |
@Ravi-t I think you're right but i can fix later. |
I think either ndpiReader should support fragments else in function "packet_processing" we should declare a new variable called nproto as if(flow != NULL) { |
You can also send a pull request if you prefer. |
In function named "packet_processing" line number 546, it will result in a crash
if(flow != NULL) {
workflow->stats.ip_packet_count++;
workflow->stats.total_wire_bytes += rawsize + 24 /* CRC etc */,
workflow->stats.total_ip_bytes += rawsize;
ndpi_flow = flow->ndpi_flow;
flow->packets++, flow->bytes += rawsize;
flow->last_seen = time;
} else {
return(flow->detected_protocol); // This line will result in a crash as flow is NULL
}
The text was updated successfully, but these errors were encountered: