aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-30 23:42:33 -0500
committerAnders Broman <a.broman58@gmail.com>2015-12-01 05:55:57 +0000
commit5b4ada17723ed8af7e85cb48d537437ed614e417 (patch)
treedad08f5c0940e3477357216b386c4ef08c71ab77 /asn1
parent79f7edba15dc4c637c7f19c0770c2ba2721d765a (diff)
[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 <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/nbap/nbap.cnf5
1 files changed, 3 insertions, 2 deletions
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;