aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcap.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-06-09 04:28:13 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-06-09 04:28:13 +0000
commit89ddd6077a7ab5e722fbef2504114aa0cec65d5d (patch)
treead64f47fe2322a927257def8b156d81760ed1dbb /epan/dissectors/packet-tcap.c
parente92c34b0f925c9336546c24d199cf2f29fff5493 (diff)
From Tim Endean:
Check for tvb. svn path=/trunk/; revision=14592
Diffstat (limited to 'epan/dissectors/packet-tcap.c')
-rw-r--r--epan/dissectors/packet-tcap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c
index f7d128b529..6fbf9e6ca5 100644
--- a/epan/dissectors/packet-tcap.c
+++ b/epan/dissectors/packet-tcap.c
@@ -328,7 +328,8 @@ offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
next_tvb = tvb_new_subset(tvb, offset, len, len);
dissect_ber_octet_string(TRUE, pinfo, tree, next_tvb, 0, hf_index,
&parameter_tvb);
-
+if (!parameter_tvb)
+ return offset+len;
dissect_tcap_UserInformation(TRUE, parameter_tvb, 0, pinfo, tree, -1);
@@ -640,6 +641,8 @@ offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
/* Use the recived length, XXX What if it was indefenet? */
next_tvb = tvb_new_subset(tvb, start_offset, len +(offset - start_offset), len+(offset - start_offset));
+if (!next_tvb)
+ return offset;
if (ber_oid_dissector_table && tcapext_oid){
if(!dissector_try_string(ber_oid_dissector_table, tcapext_oid, next_tvb, pinfo, tcap_top_tree))
{
@@ -921,7 +924,8 @@ guint8 class;
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
offset = dissect_ber_octet_string(TRUE, pinfo, tree, tvb, 0, hf_index,
&next_tvb);
-
+if (!next_tvb)
+ return offset;
dissect_tcap_param(pinfo,tree,next_tvb,0);
return offset;
@@ -1250,6 +1254,8 @@ tcap_itu_ssn_dissector_table = find_dissector_table("tcap.itu_ssn");
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), tvb_length_remaining(tvb, offset));
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
+if (!next_tvb)
+ return offset+len;
if (ber_oid_dissector_table && cur_oid){
if(!dissector_try_string(ber_oid_dissector_table, cur_oid, next_tvb, pinfo, tcap_top_tree))
{