diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-11-20 02:48:26 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-11-20 02:48:26 +0000 |
commit | 8695f02e3bac83f9d18a0dfe3aca3bc4f3fc7441 (patch) | |
tree | b420b8ce551806e2aece8f766ac3d46c466ba2cd /epan/dissectors/packet-pres.c | |
parent | 8e1e888a6b9d09f7b17955acdd11eec893db9485 (diff) |
if the packet is mangled the oid string might be NULL.
dont try to register a NULL oid
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16553 f5534014-38df-0310-8fa8-9805f1628bb7
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); |