From 9f61403c0b9885796c144748dd6623eb78ba46e2 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Sun, 1 May 2005 13:36:00 +0000 Subject: Break out of another infinite loop. Found during fuzz testing. svn path=/trunk/; revision=14250 --- plugins/megaco/packet-megaco.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/megaco') diff --git a/plugins/megaco/packet-megaco.c b/plugins/megaco/packet-megaco.c index 1a48c1e12e..388939732b 100644 --- a/plugins/megaco/packet-megaco.c +++ b/plugins/megaco/packet-megaco.c @@ -1006,6 +1006,10 @@ dissect_megaco_descriptors(tvbuff_t *tvb, proto_tree *megaco_tree_command_line, tvb_current_offset = tvb_descriptors_end_offset; } + if (tvb_current_offset <= tvb_previous_offset) { + proto_tree_add_text(megaco_tree_command_line, tvb, 0, 0, "[ Parse error: Invalid offset ]"); + return; + } -- cgit v1.2.3