aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-05-29 17:23:01 +0200
committerAnders Broman <a.broman58@gmail.com>2016-05-31 10:34:58 +0000
commit6e609d1a2b16624effece519559984c6564a4a58 (patch)
tree2e848817f68743555dce5973f4fd03a71f3f228c /epan
parented42a485ef6c64b568969b7697cb1f25d6ecd43d (diff)
mgcp: don't THROW() an exception from a dissector
we can simply abort the dissection for invalid lines or token lengths Change-Id: I14e02f49a8803db7ec0a5f5c5139705091fd926a Reviewed-on: https://code.wireshark.org/review/15628 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-mgcp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c
index a2f8b99efd..26f099ea1e 100644
--- a/epan/dissectors/packet-mgcp.c
+++ b/epan/dissectors/packet-mgcp.c
@@ -1159,7 +1159,11 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (tokennum == 0)
{
if (tokenlen > 4)
- THROW(ReportedBoundsError);
+ {
+ /* XXX - exception */
+ return;
+ }
+
code = tvb_format_text(tvb, tvb_previous_offset, tokenlen);
g_strlcpy(mi->code, code, 5);
if (is_mgcp_verb(tvb, tvb_previous_offset, tvb_current_len, &verb_description))
@@ -1553,7 +1557,8 @@ static void dissect_mgcp_params(tvbuff_t *tvb, proto_tree *tree)
/* Its a infinite loop if we didn't advance (or went backwards) */
if (old_lineend >= tvb_lineend)
{
- THROW(ReportedBoundsError);
+ /* XXX - exception */
+ break;
}
}
}