From 6791d2b2ac150e573ec22894603d633bdb4b4ef5 Mon Sep 17 00:00:00 2001 From: Marcin Kraglak Date: Wed, 24 Sep 2014 13:37:46 +0200 Subject: [PATCH] android/tester: Fix condition check It may cause NULL pointer dereference. --- android/tester-gatt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/tester-gatt.c b/android/tester-gatt.c index 42f37333b..fed9a3c77 100644 --- a/android/tester-gatt.c +++ b/android/tester-gatt.c @@ -545,7 +545,7 @@ static void gatt_cid_hook_cb(const void *data, uint16_t len, void *user_data) } queue_pop_head(t_data->pdus); gatt_pdu = queue_pop_head(t_data->pdus); - if (!gatt_pdu->data) + if (!gatt_pdu || !gatt_pdu->data) break; bthost_send_cid(bthost, cid_data->handle, cid_data->cid, -- 2.47.3