aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asn1/pres/packet-pres-template.c6
-rw-r--r--asn1/pres/pres.cnf3
-rw-r--r--epan/dissectors/packet-pres.c9
-rw-r--r--epan/dissectors/packet-pres.h2
4 files changed, 18 insertions, 2 deletions
diff --git a/asn1/pres/packet-pres-template.c b/asn1/pres/packet-pres-template.c
index 7e7513b6ff..740c774908 100644
--- a/asn1/pres/packet-pres-template.c
+++ b/asn1/pres/packet-pres-template.c
@@ -116,6 +116,12 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
pres_ctx_oid_t *pco, *tmppco;
pco=se_alloc(sizeof(pres_ctx_oid_t));
pco->ctx_id=idx;
+
+ if(!oid){
+ /* we did not get any oid name, malformed packet? */
+ return;
+ }
+
pco->oid=se_strdup(oid);
/* if this ctx already exists, remove the old one first */
diff --git a/asn1/pres/pres.cnf b/asn1/pres/pres.cnf
index ba2d332ac9..dcae453ddb 100644
--- a/asn1/pres/pres.cnf
+++ b/asn1/pres/pres.cnf
@@ -75,6 +75,9 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
if(session)
session->pres_ctx_id = presentation_context_identifier;
+#.FN_HDR Context-list/_item
+ abstract_syntax_name_oid=NULL;
+#.END
#.FN_FTR Context-list/_item
register_ctx_id_and_oid(pinfo, presentation_context_identifier, abstract_syntax_name_oid);
#.END
diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c
index ba0b1c49a6..834e4c7ff2 100644
--- a/epan/dissectors/packet-pres.c
+++ b/epan/dissectors/packet-pres.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* .\packet-pres.c */
+/* ./packet-pres.c */
/* ../../tools/asn2eth.py -X -b -e -p pres -c pres.cnf -s packet-pres-template ISO8823-PRESENTATION.asn */
/* Input file: packet-pres-template.c */
@@ -245,6 +245,12 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
pres_ctx_oid_t *pco, *tmppco;
pco=se_alloc(sizeof(pres_ctx_oid_t));
pco->ctx_id=idx;
+
+ if(!oid){
+ /* we did not get any oid name, malformed packet? */
+ return;
+ }
+
pco->oid=se_strdup(oid);
/* if this ctx already exists, remove the old one first */
@@ -461,6 +467,7 @@ static const ber_sequence_t Context_list_item_sequence[] = {
static int
dissect_pres_Context_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+ abstract_syntax_name_oid=NULL;
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
Context_list_item_sequence, hf_index, ett_pres_Context_list_item);
diff --git a/epan/dissectors/packet-pres.h b/epan/dissectors/packet-pres.h
index 8fa8051887..24c32e1e12 100644
--- a/epan/dissectors/packet-pres.h
+++ b/epan/dissectors/packet-pres.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
-/* .\packet-pres.h */
+/* ./packet-pres.h */
/* ../../tools/asn2eth.py -X -b -e -p pres -c pres.cnf -s packet-pres-template ISO8823-PRESENTATION.asn */
/* Input file: packet-pres-template.h */