aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/opsi
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-11-10 10:46:40 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-11-10 10:46:40 +0000
commitfc59435bf235ea3ed0441c8f6cd1e67c7e71fbf1 (patch)
treeadf61b3702ed424430304311ba48900f85ea2095 /plugins/opsi
parentda67e82af095f81df39a32efb1013571df7569e8 (diff)
Check for bogus attribute lengths.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12505 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'plugins/opsi')
-rw-r--r--plugins/opsi/packet-opsi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/opsi/packet-opsi.c b/plugins/opsi/packet-opsi.c
index 897cce935d..3d0cdd5a91 100644
--- a/plugins/opsi/packet-opsi.c
+++ b/plugins/opsi/packet-opsi.c
@@ -453,6 +453,10 @@ dissect_attributes(tvbuff_t *tvb, proto_tree *opsi_tree, int offset, int length)
proto_tree_add_text(ntree, tvb, offset+2, 2, "Length (%d)", attribute_length);
opsi_attributes[i].dissect(tvb, ntree, opsi_attributes[i].hf_type_attribute, offset, attribute_length);
}
+ if (attribute_length < 4) {
+ /* Length must be at least 4, for the type and length. */
+ break;
+ }
offset += attribute_length;
length -= attribute_length;
}