diff options
author | Luca Deri <deri@ntop.org> | 2016-03-05 08:22:04 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2016-03-05 08:22:04 +0100 |
commit | dd12757493a9c144fbcfe0f91da0cd2cd58d0d88 (patch) | |
tree | 9f72500d5d778f68b972694b8edf9c6028e493ec /src/lib/ndpi_main.c | |
parent | 7ea37edfbf2a603faedfb8c4e174446bbbd79d8c (diff) |
Added check to harden code
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 0d1c21c9e..1b9d4c1f6 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -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) |