From 5010a2a99cfcbc1348e1b74c548c0a38b66a297b 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 2062eb96d..1376b84c1 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) {