mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-02-25 08:05:04 +08:00
clear array before assigning
This commit is contained in:
parent
e7707cdb17
commit
d0168f2f49
1 changed files with 3 additions and 2 deletions
|
@ -177,10 +177,11 @@ void UsbCommandReceived(UsbCommand *UC)
|
|||
switch(UC->cmd) {
|
||||
// First check if we are handling a debug message
|
||||
case CMD_DEBUG_PRINT_STRING: {
|
||||
char s[USB_CMD_DATA_SIZE+1] = {0x00};
|
||||
char s[USB_CMD_DATA_SIZE+1];
|
||||
memset(s, 0x00, sizeof(s));
|
||||
size_t len = MIN(UC->arg[0],USB_CMD_DATA_SIZE);
|
||||
memcpy(s,UC->d.asBytes,len);
|
||||
PrintAndLog("#db# %s ", s);
|
||||
PrintAndLog("#db# %s", s);
|
||||
return;
|
||||
} break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue