Skip to content

Commit 82489a2

Browse files
alxelaxrlubos
authored andcommitted
tests: bluetooth: tester: fix uninitialized pointer usage
Commit fixes passing `bt_mesh_scene_register status` with not initialized `scenes` pointer. Scene client expects this field having meaningful value. If pointer have a garbage value, it will cause hardfault (reason why this test randomly falls and is randomly fixed). Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
1 parent 0a6f33a commit 82489a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • tests/bluetooth/tester/src

tests/bluetooth/tester/src/mmdl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3931,7 +3931,7 @@ static void scene_store_procedure(uint8_t *data, uint16_t len)
39313931
struct mesh_scene_ctl_store_procedure *cmd = (void *)data;
39323932
struct net_buf_simple *buf = NET_BUF_SIMPLE(3);
39333933
uint16_t scene;
3934-
struct bt_mesh_scene_register status;
3934+
struct bt_mesh_scene_register status = { .scenes = NULL };
39353935
struct model_data *model_bound;
39363936
struct bt_mesh_msg_ctx ctx = {
39373937
.net_idx = net.net_idx,

0 commit comments

Comments
 (0)