From 361d83c388f0510fcfa189dd1a313014899ce28f Mon Sep 17 00:00:00 2001 From: freddie Date: Sun, 15 Dec 2019 04:37:44 +0800 Subject: [PATCH] nimble/host: Fix NULL pointer passed as a parameter --- nimble/host/src/ble_hs_hci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c index 2062eb96d0..1376b84c17 100644 --- a/nimble/host/src/ble_hs_hci.c +++ b/nimble/host/src/ble_hs_hci.c @@ -228,7 +228,7 @@ ble_hs_hci_process_ack(uint16_t expected_opcode, } if (rc == 0) { - if (params_buf == NULL) { + if (params_buf == NULL || out_ack->bha_params == NULL) { out_ack->bha_params_len = 0; } else { if (out_ack->bha_params_len > params_buf_len) {