mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-12 18:25:07 +08:00
commit
2e47e00e94
1 changed files with 6 additions and 1 deletions
|
@ -1589,9 +1589,14 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||
BigBuf_free();
|
||||
}
|
||||
uint16_t offset = MIN(BIGBUF_SIZE - PM3_CMD_DATA_SIZE - 3, payload->offset);
|
||||
|
||||
// need to copy len bytes of data, not PM3_CMD_DATA_SIZE - 3 - offset
|
||||
// ensure len bytes copied wont go past end of bigbuf
|
||||
uint16_t len = MIN(BIGBUF_SIZE - offset,PM3_CMD_DATA_SIZE - 3);
|
||||
|
||||
uint8_t *mem = BigBuf_get_addr();
|
||||
memcpy(mem + offset, &payload->data, PM3_CMD_DATA_SIZE - 3 - offset);
|
||||
memcpy(mem + offset, &payload->data, len);
|
||||
// memcpy(mem + offset, &payload->data, PM3_CMD_DATA_SIZE - 3 - offset);
|
||||
reply_ng(CMD_LF_UPLOAD_SIM_SAMPLES, PM3_SUCCESS, NULL, 0);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue