diff options
author | Philippe Antoine <contact@catenacyber.fr> | 2020-02-14 14:02:19 +0100 |
---|---|---|
committer | Philippe Antoine <contact@catenacyber.fr> | 2020-02-14 14:02:19 +0100 |
commit | b287dccecfecd32f114b043f395019eb3b000791 (patch) | |
tree | ed67c91380435fd727f0bee1abbbe9be5133992d /example/reader_util.c | |
parent | cb34c6b23366dcfae75a27987f4676a7de021ea3 (diff) |
Checks l4 size against l3 size
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index ae132fcff..eca4d12d5 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -676,6 +676,8 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow l3 = (const u_int8_t*)iph6; } + if (ipsize < l4_offset + l4_packet_len) + return NULL; *proto = iph->protocol; |