diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-02-10 07:09:56 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-02-10 12:35:37 +0000 |
commit | 29be26c4b3b387027abcab3c859643f0ee12e5cf (patch) | |
tree | 6bf95de084b2e36c791a79793e3bd25c7c8a5cdd /asn1 | |
parent | 3b2954208a060eba500cb48c14ec6a4fe4a99494 (diff) | |
download | wireshark-29be26c4b3b387027abcab3c859643f0ee12e5cf.tar.gz |
FTAM: get rid of an evil global variable
Fixes an ASAN failure reported by Alexis
Change-Id: Id0ddad6451e22ffc53d42985e9b2071c7388d15b
Reviewed-on: https://code.wireshark.org/review/7049
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/ftam/ftam.cnf | 18 | ||||
-rw-r--r-- | asn1/ftam/packet-ftam-template.c | 1 |
2 files changed, 12 insertions, 7 deletions
diff --git a/asn1/ftam/ftam.cnf b/asn1/ftam/ftam.cnf index 468fecd3d8..d095757af5 100644 --- a/asn1/ftam/ftam.cnf +++ b/asn1/ftam/ftam.cnf @@ -66,22 +66,28 @@ Object-Availability-Attribute/actual-values actual_values8 Legal-Qualification-Attribute/actual-values actual_values9 #.FN_PARS Extension-Attribute/extension-attribute-identifier - FN_VARIANT = _str VAL_PTR = &object_identifier_id + FN_VARIANT = _str VAL_PTR = &actx->external.direct_reference #.FN_PARS OBJECT_IDENTIFIER - FN_VARIANT = _str VAL_PTR = &object_identifier_id + FN_VARIANT = _str VAL_PTR = &actx->external.direct_reference #.FN_BODY Contents-Type-Attribute/document-type/parameter - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); + if (actx->external.direct_reference) { + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL); + } #.FN_BODY Extension-Attribute/extension-attribute - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); + if (actx->external.direct_reference) { + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL); + } #.FN_PARS Attribute-Extensions-Pattern/_item/extension-set-attribute-Patterns/_item/extension-attribute-identifier - FN_VARIANT = _str VAL_PTR = &object_identifier_id + FN_VARIANT = _str VAL_PTR = &actx->external.direct_reference #.FN_BODY Attribute-Extensions-Pattern/_item/extension-set-attribute-Patterns/_item/extension-attribute-Pattern - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL); + if (actx->external.direct_reference) { + offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL); + } #.FN_BODY AP-title /* XXX have no idea about this one */ diff --git a/asn1/ftam/packet-ftam-template.c b/asn1/ftam/packet-ftam-template.c index 53533dff00..eb688e184c 100644 --- a/asn1/ftam/packet-ftam-template.c +++ b/asn1/ftam/packet-ftam-template.c @@ -47,7 +47,6 @@ void proto_reg_handoff_ftam(void); /* Initialize the protocol and registered fields */ static int proto_ftam = -1; -static const char *object_identifier_id; /* Declare the function to avoid a compiler warning */ static int dissect_ftam_OR_Set(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_); |