aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rpcap.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-06-29 07:02:04 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-06-29 07:02:04 +0000
commit958919b8ca8732a63b5a13922ebbb19090dfd29f (patch)
tree392f25d38bf165b563483a5bd37eb4c28622be50 /epan/dissectors/packet-rpcap.c
parent132c09f2d5ebae93fa40c24391c47525d22b2e0b (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.c4
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: