aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/opsi
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-11-10 10:46:40 +0000
committerGuy Harris <guy@alum.mit.edu>2004-11-10 10:46:40 +0000
commit1f4073974f24eba5f844deff3376a465d3ad4a34 (patch)
treeadf61b3702ed424430304311ba48900f85ea2095 /plugins/opsi
parentbcaceaf20eb0a14c75ffda596975dddec296b672 (diff)
Check for bogus attribute lengths.
svn path=/trunk/; revision=12505
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;
}