Skip to content

Commit 652f04f

Browse files
sjanccfriedt
authored andcommitted
tests: bluetooth: tester: Fix memory corruption in reconfigured_cb
Pass proper length when memsetting struct. Signed-off-by: Szymon Janc <[email protected]>
1 parent d72602d commit 652f04f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/bluetooth/tester/src/l2cap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static void reconfigured_cb(struct bt_l2cap_chan *l2cap_chan)
144144
struct l2cap_reconfigured_ev ev;
145145
struct channel *chan = CONTAINER_OF(l2cap_chan, struct channel, le);
146146

147-
(void)memset(&ev, 0, sizeof(struct l2cap_disconnected_ev));
147+
(void)memset(&ev, 0, sizeof(ev));
148148

149149
ev.chan_id = chan->chan_id;
150150
ev.mtu_remote = sys_cpu_to_le16(chan->le.tx.mtu);

0 commit comments

Comments
 (0)