diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-01 20:54:31 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-01 20:54:31 +0000 |
commit | b787f03df35e6ea3112014227b3078affa1768b3 (patch) | |
tree | e4bbc68759a801777337eb9bb2399f03cf274073 /epan/dissectors/packet-crmf.c | |
parent | bf579224ae30b015206d602d976998c8bbab06f3 (diff) |
Remove some global variables in favor of private_data member of asn1_ctx_t. Bug 7060 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7060). This should (mostly) passify the bug, but it appears like this could be done with a lot more ASN.1 dissectors.
svn path=/trunk/; revision=49117
Diffstat (limited to 'epan/dissectors/packet-crmf.c')
-rw-r--r-- | epan/dissectors/packet-crmf.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/epan/dissectors/packet-crmf.c b/epan/dissectors/packet-crmf.c index 3f35da3da9..cd70492258 100644 --- a/epan/dissectors/packet-crmf.c +++ b/epan/dissectors/packet-crmf.c @@ -172,9 +172,6 @@ static gint ett_crmf_Attributes = -1; /*--- End of included file: packet-crmf-ett.c ---*/ #line 50 "../../asn1/crmf/packet-crmf-template.c" -static const char *object_identifier_id; - - /*--- Included file: packet-crmf-fn.c ---*/ #line 1 "../../asn1/crmf/packet-crmf-fn.c" @@ -229,7 +226,7 @@ dissect_crmf_CertTemplate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs static int dissect_crmf_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_crmf_type_oid, &object_identifier_id); + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_crmf_type_oid, (const char**)&actx->private_data); return offset; } @@ -239,7 +236,7 @@ dissect_crmf_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ static int dissect_crmf_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 74 "../../asn1/crmf/crmf.cnf" - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + offset=call_ber_oid_callback((const char*)actx->private_data, tvb, offset, actx->pinfo, tree); @@ -886,7 +883,7 @@ static void dissect_EncKeyWithID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, /*--- End of included file: packet-crmf-fn.c ---*/ -#line 54 "../../asn1/crmf/packet-crmf-template.c" +#line 51 "../../asn1/crmf/packet-crmf-template.c" /*--- proto_register_crmf ----------------------------------------------*/ @@ -1223,7 +1220,7 @@ void proto_register_crmf(void) { NULL, HFILL }}, /*--- End of included file: packet-crmf-hfarr.c ---*/ -#line 66 "../../asn1/crmf/packet-crmf-template.c" +#line 63 "../../asn1/crmf/packet-crmf-template.c" }; /* List of subtrees */ @@ -1259,7 +1256,7 @@ void proto_register_crmf(void) { &ett_crmf_Attributes, /*--- End of included file: packet-crmf-ettarr.c ---*/ -#line 71 "../../asn1/crmf/packet-crmf-template.c" +#line 68 "../../asn1/crmf/packet-crmf-template.c" }; /* Register protocol */ @@ -1293,6 +1290,6 @@ void proto_reg_handoff_crmf(void) { /*--- End of included file: packet-crmf-dis-tab.c ---*/ -#line 89 "../../asn1/crmf/packet-crmf-template.c" +#line 86 "../../asn1/crmf/packet-crmf-template.c" } |