From c8882c0f29030d1e3aa2506a7f2283e32bc72c3f Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 19 Oct 2020 21:19:39 -0700 Subject: [PATCH] bthci: add a note about the case where we hve no connection handle. A previous change initialized the k_connection_handle, so we don't compare random data with remote_bdaddr->chandle, but perhaps we shouldn't compare it at all if we didn't find a handle pair. --- epan/dissectors/packet-bthci_iso.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epan/dissectors/packet-bthci_iso.c b/epan/dissectors/packet-bthci_iso.c index 13cc4aa3f4..4c57566350 100644 --- a/epan/dissectors/packet-bthci_iso.c +++ b/epan/dissectors/packet-bthci_iso.c @@ -205,6 +205,10 @@ dissect_bthci_iso(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat /* remote bdaddr and name */ remote_bdaddr = (remote_bdaddr_t *)wmem_tree_lookup32_array_le(bluetooth_data->chandle_to_bdaddr, key); + /* + * XXX - do this only if we found a handle pair, so that we have + * a connection handle? + */ if (remote_bdaddr && remote_bdaddr->interface_id == bluetooth_data->interface_id && remote_bdaddr->adapter_id == bluetooth_data->adapter_id && remote_bdaddr->chandle == k_connection_handle) {