mirror of
https://github.com/nfstream/nfstream.git
synced 2026-05-21 02:10:50 +00:00
Add missing length check.
This commit is contained in:
parent
88f2ef33ee
commit
eb7aa112c3
1 changed files with 1 additions and 1 deletions
|
|
@ -905,7 +905,7 @@ int process_packet(pcap_t * pcap_handle, const struct pcap_pkthdr *header, const
|
|||
mpls.u32 = ntohl(mpls.u32);
|
||||
type = ETH_P_IP, ip_offset += 4;
|
||||
|
||||
while(!mpls.mpls.s) {
|
||||
while(!mpls.mpls.s && (((bpf_u_int32)ip_offset) + 4 < header->caplen)) {
|
||||
mpls.u32 = *((uint32_t *) &packet[ip_offset]);
|
||||
mpls.u32 = ntohl(mpls.u32);
|
||||
ip_offset += 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue