From e06c37bc455b2571f507026c793a1b403d577bf4 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Sun, 28 Aug 2005 20:15:08 +0000 Subject: Correct an eariler infinite loop fix. Fixes bug 382. svn path=/trunk/; revision=15600 --- epan/dissectors/packet-rsvp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-rsvp.c') diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index c7925c765f..797ba92cf5 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -4056,12 +4056,12 @@ dissect_rsvp_gen_uni (proto_tree *ti, proto_tree *rsvp_object_tree, } - l += tvb_get_guint8(tvb, offset2+l+1); - if (l < 1) { + if (tvb_get_guint8(tvb, offset2+l+1) < 1) { proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+1, 1, "Invalid length: %u", tvb_get_guint8(tvb, offset2+l+1)); return; } + l += tvb_get_guint8(tvb, offset2+l+1); if (l < mylen) { if (i < 4) proto_item_append_text(ti, ", "); -- cgit v1.2.3