The cmd_le_read_supported_states handler incorrectly clears out
the response structure before filling it with what is effectively
a sizeof(int), rather than size of the actual structure.
---
emulator/btdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index f02103f0e..65b2048f3 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -3331,7 +3331,7 @@ static int cmd_le_read_supported_states(struct
btdev *dev, const void *data,
{
struct bt_hci_rsp_le_read_supported_states rsp;
- memset(&rsp, 0, sizeof(0));
+ memset(&rsp, 0, sizeof(rsp));
rsp.status = BT_HCI_ERR_SUCCESS;
memcpy(rsp.states, dev->le_states, 8);
cmd_complete(dev, BT_HCI_CMD_LE_READ_SUPPORTED_STATES, &rsp,
--
2.29.2.windows.2