mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
always make sure resp is initialized
This commit is contained in:
parent
0388682591
commit
4ee7b78a07
1 changed files with 3 additions and 1 deletions
|
@ -820,7 +820,6 @@ bool WaitForResponse(uint32_t cmd, PacketResponseNG *response) {
|
|||
bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint32_t start_index, uint8_t *data, uint32_t datalen, PacketResponseNG *response, size_t ms_timeout, bool show_warning) {
|
||||
|
||||
if (dest == NULL) return false;
|
||||
if (bytes == 0) return true;
|
||||
|
||||
PacketResponseNG resp;
|
||||
if (response == NULL) {
|
||||
|
@ -839,6 +838,9 @@ bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint3
|
|||
resp.oldarg[2] = 0;
|
||||
memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE);
|
||||
|
||||
if (bytes == 0) return true;
|
||||
|
||||
|
||||
// clear
|
||||
clearCommandBuffer();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue