diff options
author | Anders Broman <anders.broman@ericsson.com> | 2005-06-08 18:52:34 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2005-06-08 18:52:34 +0000 |
commit | d82116f2aa9df5a1e762ccb4ecec6f467b846e5c (patch) | |
tree | da2c26b8b2ae2efcb017d46830a66406e408ecde /epan | |
parent | 8b8f7af3b551ad5a2e265dfac3743cfd01161bff (diff) |
From Olivier Jacques,
- beautify TCAP decoding without upper dissector associated.
With a couple of if (parameter_tvb) trown in to hopfully fix a Buildbot crash output
svn path=/trunk/; revision=14590
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-tcap.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c index e3e84a097e..f7d128b529 100644 --- a/epan/dissectors/packet-tcap.c +++ b/epan/dissectors/packet-tcap.c @@ -1311,16 +1311,17 @@ tvbuff_t *parameter_tvb; guint8 len, i; offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, ¶meter_tvb); -len = tvb_length_remaining(parameter_tvb, 0); -if ((len)&&(check_col(pinfo->cinfo, COL_INFO))) - { - - col_append_fstr(pinfo->cinfo, COL_INFO, "otid("); + +if (parameter_tvb){ + len = tvb_length_remaining(parameter_tvb, 0); + if ((len)&&(check_col(pinfo->cinfo, COL_INFO))){ + col_append_fstr(pinfo->cinfo, COL_INFO, "otid("); for(i=0;i<len;i++) - col_append_fstr(pinfo->cinfo, COL_INFO, "%02x",tvb_get_guint8(parameter_tvb,i)); - col_append_fstr(pinfo->cinfo, COL_INFO, ") "); - } + col_append_fstr(pinfo->cinfo, COL_INFO, "%02x",tvb_get_guint8(parameter_tvb,i)); + col_append_fstr(pinfo->cinfo, COL_INFO, ") "); + } +} return offset; } @@ -1355,15 +1356,15 @@ tvbuff_t *parameter_tvb; guint8 len , i; offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, ¶meter_tvb); -len = tvb_length_remaining(parameter_tvb, 0); -if ((len)&&(check_col(pinfo->cinfo, COL_INFO))) - { - col_append_fstr(pinfo->cinfo, COL_INFO, "dtid("); - for(i=0;i<len;i++) - col_append_fstr(pinfo->cinfo, COL_INFO, "%02x",tvb_get_guint8(parameter_tvb,i)); - col_append_fstr(pinfo->cinfo, COL_INFO, ") "); - } - +if (parameter_tvb){ + len = tvb_length_remaining(parameter_tvb, 0); + if ((len)&&(check_col(pinfo->cinfo, COL_INFO))){ + col_append_fstr(pinfo->cinfo, COL_INFO, "dtid("); + for(i=0;i<len;i++) + col_append_fstr(pinfo->cinfo, COL_INFO, "%02x",tvb_get_guint8(parameter_tvb,i)); + col_append_fstr(pinfo->cinfo, COL_INFO, ") "); + } +} return offset; } @@ -2973,7 +2974,7 @@ tlen = tvb_length_remaining(tvb, offset); if (pc) { pi = - proto_tree_add_text(tree, tvb, saved_offset, -1, "CONSTRUCTOR"); + proto_tree_add_text(tree, tvb, saved_offset, len + (len_offset - saved_offset), "CONSTRUCTOR"); subtree = proto_item_add_subtree(pi, ett_param); proto_tree_add_uint_format(subtree, hf_tcap_tag, tvb, saved_offset, tag_offset-saved_offset, tag, "CONSTRUCTOR Tag"); @@ -2993,7 +2994,7 @@ tlen = tvb_length_remaining(tvb, offset); pi = proto_tree_add_text(tree, tvb, - saved_offset, len + (len_offset - saved_offset), "Parameter"); + saved_offset, len + (len_offset - saved_offset), "Parameter (0x%.2x)", tag); subtree = proto_item_add_subtree(pi, ett_param); |