forked from Mirrors/sngrep
capture: properly validate capture length calculated from IP headers #430
This commit is contained in:
parent
e1d2b322ac
commit
038a658835
|
@ -616,6 +616,10 @@ capture_packet_reasm_ip(capture_info_t *capinfo, const struct pcap_pkthdr *heade
|
|||
}
|
||||
}
|
||||
|
||||
// Check maximum capture len
|
||||
if (*caplen > MAX_CAPTURE_LEN)
|
||||
return NULL;
|
||||
|
||||
// If no fragmentation
|
||||
if (ip_frag == 0) {
|
||||
// Just create a new packet with given network data
|
||||
|
|
Loading…
Reference in New Issue