aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isakmp.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2004-11-29 19:30:12 +0000
committerGerald Combs <gerald@wireshark.org>2004-11-29 19:30:12 +0000
commit795a28ec7ca67c323e2541b06112f6a4e985b6dd (patch)
tree890ce5e0620017750e0a722f17af6e95d2236328 /epan/dissectors/packet-isakmp.c
parent1b96812a61175af9bdc6bdc991724b124723666c (diff)
Add another length check.
svn path=/trunk/; revision=12621
Diffstat (limited to 'epan/dissectors/packet-isakmp.c')
-rw-r--r--epan/dissectors/packet-isakmp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c
index 6f483795cb..bb22a740a4 100644
--- a/epan/dissectors/packet-isakmp.c
+++ b/epan/dissectors/packet-isakmp.c
@@ -456,6 +456,12 @@ dissect_payloads(tvbuff_t *tvb, proto_tree *tree, guint8 initial_payload,
"Payload");
}
}
+ else if (payload_length > length) {
+ proto_tree_add_text(ntree, tvb, offset + 4, 0,
+ "Payload (bogus, length is %u, greater than remaining length %d",
+ payload_length, length);
+ return;
+ }
else {
proto_tree_add_text(ntree, tvb, offset + 4, 0,
"Payload (bogus, length is %u, must be at least 4)",