From 8695f02e3bac83f9d18a0dfe3aca3bc4f3fc7441 Mon Sep 17 00:00:00 2001 From: sahlberg Date: Sun, 20 Nov 2005 02:48:26 +0000 Subject: 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 --- epan/dissectors/packet-pres.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'epan/dissectors/packet-pres.c') 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); -- cgit v1.2.3