diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2011-06-29 07:02:04 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2011-06-29 07:02:04 +0000 |
commit | 958919b8ca8732a63b5a13922ebbb19090dfd29f (patch) | |
tree | 392f25d38bf165b563483a5bd37eb4c28622be50 /epan/dissectors/packet-rpcap.c | |
parent | 132c09f2d5ebae93fa40c24391c47525d22b2e0b (diff) |
Strengthen heuristics for Packets.
This fixes bug 6073.
svn path=/trunk/; revision=37828
Diffstat (limited to 'epan/dissectors/packet-rpcap.c')
-rw-r--r-- | epan/dissectors/packet-rpcap.c | 4 |
1 files changed, 4 insertions, 0 deletions
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: |