forked from Mirrors/sngrep
tcp: don't store negative length payloads for assembly #187
This commit is contained in:
parent
60d98b3316
commit
35eca717b8
|
@ -600,7 +600,7 @@ capture_packet_reasm_tcp(capture_info_t *capinfo, packet_t *packet, struct tcphd
|
|||
// We have a full SIP Packet, but do not remove everything from the reasm queue
|
||||
packet_t *cont = packet_clone(pkt);
|
||||
int pldiff = original_size - pkt->payload_len;
|
||||
if (pldiff < MAX_CAPTURE_LEN) {
|
||||
if (pldiff > 0 && pldiff < MAX_CAPTURE_LEN) {
|
||||
packet_set_payload(cont, full_payload + pkt->payload_len, pldiff);
|
||||
vector_append(capinfo->tcp_reasm, cont);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue