Commit ae495b76 authored by Vinayak Chettimada's avatar Vinayak Chettimada Committed by Anas Nashif
Browse files

Bluetooth: Controller: Fix incorrect auto variable init


Coverity analysis discovered NULL pointer being
dereferenced when passing a auto variable. The variable is
now correctly assigned with address of a valid default
value variable. As per design, the dereferencing will not
happen as the master role does not use the passed parameter
only slave role uses it to prepare the connection parameter
request PDU.

Change-id: I3f8519b23a83cb8c50c7fba81810eff7737ff74a
Signed-off-by: default avatarVinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
parent 3b224941
Showing with 4 additions and 1 deletion
+4 -1
......@@ -3287,9 +3287,12 @@ static void sched_free_win_offset_calc(struct connection *conn_curr,
static void work_sched_free_win_offset_calc(void *params)
{
struct connection *conn = (struct connection *)params;
uint32_t *ticks_to_offset_next = 0;
uint32_t ticks_to_offset_default = 0;
uint32_t *ticks_to_offset_next;
uint8_t offset_max = 6;
ticks_to_offset_next = &ticks_to_offset_default;
if (conn->role.slave.role != 0) {
conn->llcp.connection_update.ticks_to_offset_next =
conn->role.slave.ticks_to_offset;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment