aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-03-03 14:26:13 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-03-03 14:51:39 +0000
commit2780a303ab0e8d293bd9be88b523de1bb02b413c (patch)
tree442195a052b6f2d6ac33d7bff9e526498edb7f98 /asn1
parent8933cbb3e329454cf2c099f2ef5dc3c985f94846 (diff)
GSM MAP: do not use a global variable to store OID
Fixes an ASAN failure reported by Alexis Change-Id: I63b07ec4b6eb0698c4abf27f8fb0b1f11a19396d Reviewed-on: https://code.wireshark.org/review/7510 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/gsm_map/gsm_map.cnf8
-rw-r--r--asn1/gsm_map/packet-gsm_map-template.c1
2 files changed, 5 insertions, 4 deletions
diff --git a/asn1/gsm_map/gsm_map.cnf b/asn1/gsm_map/gsm_map.cnf
index 9349fe724e..5d95ebf3b9 100644
--- a/asn1/gsm_map/gsm_map.cnf
+++ b/asn1/gsm_map/gsm_map.cnf
@@ -225,13 +225,15 @@ MAP-DialoguePDU B "0.4.0.0.1.1.1.1" "map-DialogueAS"
# End ROS
#----------------------------------------------------------------------------------------
-#.FN_PARS PrivateExtension/extId FN_VARIANT = _str VAL_PTR = &obj_id
+#.FN_BODY PrivateExtension/extId FN_VARIANT = _str VAL_PTR = &actx->external.direct_reference
+%(DEFAULT_BODY)s
+ actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE;
#.FN_BODY PrivateExtension/extType
proto_tree *ext_tree;
ext_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_gsm_map_extention_data, NULL, "Extension Data");
- if (obj_id){
- offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
+ if (actx->external.direct_ref_present){
+ offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
offset = tvb_reported_length_remaining(tvb,offset);
diff --git a/asn1/gsm_map/packet-gsm_map-template.c b/asn1/gsm_map/packet-gsm_map-template.c
index 91affad541..b90903d90d 100644
--- a/asn1/gsm_map/packet-gsm_map-template.c
+++ b/asn1/gsm_map/packet-gsm_map-template.c
@@ -208,7 +208,6 @@ static proto_tree *top_tree;
static int application_context_version;
static guint ProtocolId;
static guint AccessNetworkProtocolId;
-static const char *obj_id = NULL;
static int gsm_map_tap = -1;
static guint8 gsmmap_pdu_type = 0;
static guint8 gsm_map_pdu_size = 0;