diff options
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 1dc110e50..a04f009db 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1837,6 +1837,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow, case ETH_P_MPLS_UNI: case ETH_P_MPLS_MULTI: + if(ip_offset+4 >= (int)header->caplen) + return(nproto); mpls.u32 = *((uint32_t *) &packet[ip_offset]); mpls.u32 = ntohl(mpls.u32); workflow->stats.mpls_count++; |