From 5b4ada17723ed8af7e85cb48d537437ed614e417 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 30 Nov 2015 23:42:33 -0500 Subject: [NBAP] Prevent crash. If no previous conversation exists, a memcpy will try to copy from NULL destination. Bug: 11835 Change-Id: I445480bb425834c5a918f1ffa148cb83d6c9750c Reviewed-on: https://code.wireshark.org/review/12326 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- asn1/nbap/nbap.cnf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'asn1') diff --git a/asn1/nbap/nbap.cnf b/asn1/nbap/nbap.cnf index 403b2888c6..696185380a 100644 --- a/asn1/nbap/nbap.cnf +++ b/asn1/nbap/nbap.cnf @@ -1453,8 +1453,9 @@ BindingID_port = 0; conversation_set_dissector(conversation, fp_handle); if(actx->pinfo->link_dir==P2P_DIR_DL){ umts_fp_conversation_info = wmem_new0(wmem_file_scope(), umts_fp_conversation_info_t); - /*Steal the old informatoin*/ - memcpy(umts_fp_conversation_info,conversation_get_proto_data(old_conversation, proto_fp),sizeof(umts_fp_conversation_info_t)); + /* Steal the old information */ + if (old_conversation) + memcpy(umts_fp_conversation_info,conversation_get_proto_data(old_conversation, proto_fp),sizeof(umts_fp_conversation_info_t)); /* Overwrite the data */ umts_fp_conversation_info->iface_type = IuB_Interface; -- cgit v1.2.3