aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pres.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-11-20 02:48:26 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-11-20 02:48:26 +0000
commit2d8fb070ca0991635f4b3b561bc335e796e4034c (patch)
treeb420b8ce551806e2aece8f766ac3d46c466ba2cd /epan/dissectors/packet-pres.c
parent15e0ccf8872ed816dd3999aab4d4581d2c5f6022 (diff)
if the packet is mangled the oid string might be NULL.
dont try to register a NULL oid svn path=/trunk/; revision=16553
Diffstat (limited to 'epan/dissectors/packet-pres.c')
-rw-r--r--epan/dissectors/packet-pres.c9
1 files changed, 8 insertions, 1 deletions
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);