diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-11-20 02:48:26 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-11-20 02:48:26 +0000 |
commit | 2d8fb070ca0991635f4b3b561bc335e796e4034c (patch) | |
tree | b420b8ce551806e2aece8f766ac3d46c466ba2cd /epan/dissectors/packet-pres.c | |
parent | 15e0ccf8872ed816dd3999aab4d4581d2c5f6022 (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.c | 9 |
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); |