Skip to content

Commit

Permalink
Bluetooth: Mesh: net_key_status only pull one key idx
Browse files Browse the repository at this point in the history
Fixes bug where the config client's net_key_status handler would attempt
to pull two key indexes from a message which only holds one.

Fixes #24601.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
  • Loading branch information
trond-snekvik authored and jhedberg committed Apr 28, 2020
1 parent 341681f commit 82083a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subsys/bluetooth/mesh/cfg_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static void net_key_status(struct bt_mesh_model *model,
struct net_buf_simple *buf)
{
struct net_key_param *param;
u16_t net_idx, app_idx;
u16_t net_idx;
u8_t status;

BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
Expand All @@ -165,7 +165,7 @@ static void net_key_status(struct bt_mesh_model *model,
}

status = net_buf_simple_pull_u8(buf);
key_idx_unpack(buf, &net_idx, &app_idx);
net_idx = net_buf_simple_pull_le16(buf) & 0xfff;

param = cli->op_param;
if (param->net_idx != net_idx) {
Expand Down

0 comments on commit 82083a9

Please sign in to comment.