mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
wireless/bt_hcicore: Fix buffer type confusion on missing response.
Fix possible stack corruption on missing command response. Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
This commit is contained in:
committed by
Xiang Xiao
parent
29da7fc824
commit
08c239dcd1
@@ -2017,6 +2017,12 @@ int bt_hci_cmd_send_sync(uint16_t opcode, FAR struct bt_buf_s *buf,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wlerr("ERROR: Failed get response\n");
|
||||||
|
nxsem_destroy(&sync_sem);
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
/* Note: if ret < 0 the packet might just be delayed and could still
|
/* Note: if ret < 0 the packet might just be delayed and could still
|
||||||
* be sent. We cannot decrease the ref count since it if it was sent
|
* be sent. We cannot decrease the ref count since it if it was sent
|
||||||
|
|||||||
Reference in New Issue
Block a user