mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 02:04:39 +08:00
Merge pull request #190 from uhei/memcpy-bo
client/comms.c: fix buffer overflow
This commit is contained in:
commit
5aed3e04c9
1 changed files with 1 additions and 1 deletions
|
@ -613,7 +613,7 @@ int TestProxmark(void) {
|
|||
|
||||
SendCommandNG(CMD_CAPABILITIES, NULL, 0);
|
||||
if (WaitForResponseTimeoutW(CMD_CAPABILITIES, &resp, 1000, false)) {
|
||||
memcpy(&pm3_capabilities, resp.data.asBytes, resp.length);
|
||||
memcpy(&pm3_capabilities, resp.data.asBytes, MIN(sizeof(capabilities_t), resp.length));
|
||||
conn.send_via_fpc_usart = pm3_capabilities.via_fpc;
|
||||
conn.uart_speed = pm3_capabilities.baudrate;
|
||||
PrintAndLogEx(INFO, "Communicating with PM3 over %s", conn.send_via_fpc_usart ? _YELLOW_("FPC UART") : _YELLOW_("USB-CDC"));
|
||||
|
|
Loading…
Reference in a new issue