Added check to harden code

This commit is contained in:
Luca Deri
2016-03-05 08:22:04 +01:00
parent 7ea37edfbf
commit dd12757493
+2
View File
@@ -3196,6 +3196,8 @@ ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_st
struct ndpi_flow_struct *flow) {
ndpi_protocol ret = { NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_UNKNOWN };
if(flow == NULL) return(ret);
/* TODO: add the remaining stage_XXXX protocols */
if(flow->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) {
if(flow->http_detected)