Skip to content

Commit 349f9df

Browse files
sjancjhedberg
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 0a29a5a commit 349f9df

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
@@ -142,7 +142,7 @@ static void reconfigured_cb(struct bt_l2cap_chan *l2cap_chan)
142142
struct l2cap_reconfigured_ev ev;
143143
struct channel *chan = CONTAINER_OF(l2cap_chan, struct channel, le);
144144

145-
(void)memset(&ev, 0, sizeof(struct l2cap_disconnected_ev));
145+
(void)memset(&ev, 0, sizeof(ev));
146146

147147
ev.chan_id = chan->chan_id;
148148
ev.mtu_remote = sys_cpu_to_le16(chan->le.tx.mtu);

0 commit comments

Comments
 (0)