diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c index 33bf8b4938..0596e0a574 100644 --- a/epan/dissectors/packet-rpcap.c +++ b/epan/dissectors/packet-rpcap.c @@ -952,6 +952,10 @@ check_rpcap_heur (tvbuff_t *tvb, gboolean tcp) /* Must have the frame header */ if (plen < 20) return FALSE; + + /* Check if capture length is valid */ + if (tvb_get_ntohl (tvb, offset+8) > len) + return FALSE; break; case RPCAP_MSG_FINDALLIF_REPLY: