aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorPhilippe Antoine <contact@catenacyber.fr>2020-01-31 15:26:34 +0100
committerPhilippe Antoine <contact@catenacyber.fr>2020-01-31 15:26:34 +0100
commitb97360d931d504a1c1fcfa7d2a8bb577e148be35 (patch)
treedb5dddf745bd8b81c55e11a5c00b3020a0d639a0 /example/reader_util.c
parent579dd7dff9bcb973ab83d7b222d5250de5028794 (diff)
Fix infinite loop in ndpi_workflow_process_packet
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 8a6a0d637..eb73ee632 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -1603,7 +1603,8 @@ ether_type_check:
if(iph->protocol == IPPROTO_IPV6) {
ip_offset += ip_len;
- goto iph_check;
+ if (ip_len > 0)
+ goto iph_check;
}
if((frag_off & 0x1FFF) != 0) {