From c2b7f15556c1d63dc6bc04335eafc0fe7167452f Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Mon, 4 May 2020 18:08:02 +0530 Subject: [PATCH] Bluetooth: controller: split: Avoid ticker null pointer dereferencing Avoid ticker from null pointer dereferencing when storing operation callback functions to be called during collision resolution. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ticker/ticker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/controller/ticker/ticker.c b/subsys/bluetooth/controller/ticker/ticker.c index 8f9a0fe14da..ffad7682bba 100644 --- a/subsys/bluetooth/controller/ticker/ticker.c +++ b/subsys/bluetooth/controller/ticker/ticker.c @@ -2032,7 +2032,8 @@ static inline void ticker_job_list_insert(struct ticker_instance *instance, ticker_job_op_cb(user_op, status); #if !defined(CONFIG_BT_TICKER_COMPATIBILITY_MODE) - if (ticker->ticks_periodic == 0U) { + if ((ticker->ticks_periodic == 0U) && + user_op) { ticker->fp_op_func = user_op->fp_op_func; ticker->op_context =