aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/h248/packet-h248-template.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-03-13 13:26:13 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-03-13 13:26:13 +0000
commitfd19aa7c890996fa9d43440ea5c26433c486f059 (patch)
tree97ef9e04a7bf80c7438f281ab2b1628bff90efef /asn1/h248/packet-h248-template.c
parent16a7f0db082224083f55c3266fd7c5682f04d671 (diff)
H.248 Annex E dissector does not properly dissect event parameters
(Update the h.248 dissector's package registration to support v1 packets.) Applying part of the patch from Alex Lindberg in bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6915 by hand. Fixes bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4842 svn path=/trunk/; revision=41526
Diffstat (limited to 'asn1/h248/packet-h248-template.c')
-rw-r--r--asn1/h248/packet-h248-template.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c
index 932817f9dd..8845d2c08b 100644
--- a/asn1/h248/packet-h248-template.c
+++ b/asn1/h248/packet-h248-template.c
@@ -1291,6 +1291,34 @@ static int dissect_h248_EventParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb
return end_offset;
}
+static int dissect_h248_EventParamValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) {
+ tvbuff_t *next_tvb;
+ int end_offset;
+ gint8 class;
+ gboolean pc, ind;
+ gint32 tag;
+ guint32 len;
+
+ offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+ offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
+ end_offset=offset+len;
+
+ if( (class!=BER_CLASS_UNI)
+ ||(tag!=BER_UNI_TAG_OCTETSTRING) ){
+ proto_tree_add_text(tree, tvb, offset-2, 2, "H.248 BER Error: OctetString expected but Class:%d PC:%d Tag:%d was unexpected", class, pc, tag);
+ return end_offset;
+ }
+
+
+ next_tvb = tvb_new_subset(tvb,offset,len,len);
+
+ if ( curr_info.par && curr_info.par->dissector) {
+ curr_info.par->dissector(tree, next_tvb, actx->pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
+ }
+
+ return end_offset;
+}
+
static int dissect_h248_MtpAddress(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
tvbuff_t *new_tvb;
proto_tree *mtp_tree=NULL;