aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-06-08 15:32:00 +0000
committerGerald Combs <gerald@wireshark.org>2005-06-08 15:32:00 +0000
commit8b8f7af3b551ad5a2e265dfac3743cfd01161bff (patch)
treed607f0148ad3bb4f69943819d049d9ac803acd6b /epan
parent53ace04fe1bf4513902a22aa3e2051663bb12e11 (diff)
Break out of an infinite loop. Fixes bug 232.
svn path=/trunk/; revision=14589
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-h1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dissectors/packet-h1.c b/epan/dissectors/packet-h1.c
index 245dff7c16..286e2d7b6c 100644
--- a/epan/dissectors/packet-h1.c
+++ b/epan/dissectors/packet-h1.c
@@ -240,6 +240,8 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return FALSE;
break;
}
+ if (tvb_get_guint8(tvb,offset + position + 1) < 1)
+ THROW(ReportedBoundsError);
position += tvb_get_guint8(tvb,offset + position + 1); /* Goto next section */
} /* ..while */
next_tvb = tvb_new_subset(tvb, offset+tvb_get_guint8(tvb,offset+2), -1, -1);