aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2004-12-07 16:17:50 +0000
committerGerald Combs <gerald@wireshark.org>2004-12-07 16:17:50 +0000
commit1bdc52af46ea7168b041c90e9245cd8b44370770 (patch)
tree420f907d9b72d12f4d3fc1b16a6d807620e53ab3
parent97c3a23bebd5de9fa7e964f42dd83100369c9b3d (diff)
Check for a bogus length value.
svn path=/trunk/; revision=12677
-rw-r--r--epan/dissectors/packet-bvlc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/dissectors/packet-bvlc.c b/epan/dissectors/packet-bvlc.c
index 64bd69092e..db50ccf8ba 100644
--- a/epan/dissectors/packet-bvlc.c
+++ b/epan/dissectors/packet-bvlc.c
@@ -142,6 +142,11 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (tree) {
+ if (bvlc_length < 4) {
+ proto_tree_add_text(tree, tvb, 2, 2,
+ "Bogus length: %d", bvlc_length);
+ return;
+ }
ti = proto_tree_add_item(tree, proto_bvlc, tvb, 0,
bvlc_length, FALSE);
bvlc_tree = proto_item_add_subtree(ti, ett_bvlc);