diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-10-17 13:28:19 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-10-17 12:43:37 +0000 |
commit | fc144aa595d031c67ba100f55a8d3afa5e0b2a3a (patch) | |
tree | b25b21d245cd3d37cb1ad91630357d31de6b4065 /asn1 | |
parent | 1a434143693a7f9ce103dfcf53e60c63415c81e8 (diff) | |
download | wireshark-fc144aa595d031c67ba100f55a8d3afa5e0b2a3a.tar.gz wireshark-fc144aa595d031c67ba100f55a8d3afa5e0b2a3a.tar.bz2 wireshark-fc144aa595d031c67ba100f55a8d3afa5e0b2a3a.zip |
NBAP: avoid dereferencing a NULL pointer
Bug: 11602
Change-Id: I56b9db19eca416c288f36c1f3a4faa7e22b38c8f
Reviewed-on: https://code.wireshark.org/review/11109
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
(cherry picked from commit 5bf565690ad9f0771196d8fa237aa37fae3bb7cc)
Reviewed-on: https://code.wireshark.org/review/11110
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/nbap/nbap.cnf | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/asn1/nbap/nbap.cnf b/asn1/nbap/nbap.cnf index f7b62c22c9..aa829a0c66 100644 --- a/asn1/nbap/nbap.cnf +++ b/asn1/nbap/nbap.cnf @@ -1243,7 +1243,7 @@ dch_id = 0xFFFFFFFF; #.FN_BODY RL-Specific-E-DCH-Information-Item address dst_addr, null_addr; conversation_t *conversation; -umts_fp_conversation_info_t *umts_fp_conversation_info; +umts_fp_conversation_info_t *umts_fp_conversation_info = NULL; nbap_edch_port_info_t *old_info = NULL; transportLayerAddress_ipv4 = 0; @@ -1263,11 +1263,14 @@ BindingID_port = 0; conversation = find_conversation(actx->pinfo->fd->num,&dst_addr, &null_addr, PT_UDP, BindingID_port, 0, NO_ADDR_B|NO_PORT_B); + if (conversation) { + umts_fp_conversation_info = (umts_fp_conversation_info_t*)conversation_get_proto_data(conversation, proto_fp); + } /* We must also check if this port is about to be overriden, if that's the case we * might already have a DCH entry on this port which should be overwritten */ - if (conversation == NULL || ((umts_fp_conversation_info_t*)conversation_get_proto_data(conversation, proto_fp))->channel == CHANNEL_DCH) { + if ((conversation == NULL) || (umts_fp_conversation_info && umts_fp_conversation_info->channel == CHANNEL_DCH)) { |