diff options
author | Anish Bhatt <anish@chelsio.com> | 2015-12-12 13:54:29 -0800 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-12-13 12:55:13 +0000 |
commit | 23379ae3624df82c170f48e5bb3250a97ec61c13 (patch) | |
tree | c33de4a62e4fc7df00d262ba79b915742797a571 /asn1 | |
parent | 4e43fc490a23086848011fd94b276949b9bfdf71 (diff) |
NBAP : Verify conversation proto data exists before trying to access it
Bug 11841
Change-Id: Ic0dea6491a68a042ddc0f2dbee19739e4568b18c
Reviewed-on: https://code.wireshark.org/review/12576
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/nbap/nbap.cnf | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/asn1/nbap/nbap.cnf b/asn1/nbap/nbap.cnf index c1089ab1dd..f2d7c924bd 100644 --- a/asn1/nbap/nbap.cnf +++ b/asn1/nbap/nbap.cnf @@ -1410,6 +1410,7 @@ guint32 no_ddi_entries, i; address dst_addr, null_addr; conversation_t *conversation,*old_conversation = NULL; umts_fp_conversation_info_t *umts_fp_conversation_info _U_; +void *conv_proto_data = NULL; transportLayerAddress_ipv4 = 0; BindingID_port = 0; @@ -1454,9 +1455,11 @@ BindingID_port = 0; 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 information */ - if (old_conversation) - memcpy(umts_fp_conversation_info,conversation_get_proto_data(old_conversation, proto_fp),sizeof(umts_fp_conversation_info_t)); - + if (old_conversation) { + conv_proto_data = conversation_get_proto_data(old_conversation, proto_fp); + if (conv_proto_data) + memcpy(umts_fp_conversation_info,conv_proto_data,sizeof(umts_fp_conversation_info_t)); + } /* Overwrite the data */ umts_fp_conversation_info->iface_type = IuB_Interface; umts_fp_conversation_info->division = Division_FDD; |