aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/nbap
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-10-17 13:28:19 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-10-17 12:43:13 +0000
commit5bf565690ad9f0771196d8fa237aa37fae3bb7cc (patch)
tree9c134ecdb6f53810a22e2c30b1fa6d74daa71b95 /asn1/nbap
parent94fee9e78f7dcaa5c69e55c9ba823899565af339 (diff)
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>
Diffstat (limited to 'asn1/nbap')
-rw-r--r--asn1/nbap/nbap.cnf7
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)) {