BTLE: check for btle_context

Check for btle_context before accessing it.

Bug: 16612
Change-Id: I8ad0237a6f742f4091e886b0151917542d2eea82
Reviewed-on: https://code.wireshark.org/review/37387
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Uli Heilmeier 2020-06-06 12:46:12 +02:00 committed by Anders Broman
parent a5886341e4
commit 7c6e1a02ce
1 changed files with 1 additions and 1 deletions

View File

@ -798,7 +798,7 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
case 0x01: /* ADV_DIRECT_IND */
case 0x05: /* CONNECT_IND or AUX_CONNECT_REQ */
if (!(btle_context->channel < 37)) {
if (btle_context && btle_context->channel >= 37) {
/* CONNECT_IND */
ch_sel_valid = TRUE;
}