mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-16 02:03:00 -07:00
Limit DbpString size to the buffer size, patch by Andreas from proxmark forums
This commit is contained in:
parent
7fe9b0b742
commit
92e592ce71
1 changed files with 3 additions and 0 deletions
|
@ -76,6 +76,9 @@ void DbpString(char *str)
|
|||
UsbCommand c;
|
||||
c.cmd = CMD_DEBUG_PRINT_STRING;
|
||||
c.arg[0] = strlen(str);
|
||||
if(c.arg[0] > sizeof(c.d.asBytes)) {
|
||||
c.arg[0] = sizeof(c.d.asBytes);
|
||||
}
|
||||
memcpy(c.d.asBytes, str, c.arg[0]);
|
||||
|
||||
UsbSendPacket((BYTE *)&c, sizeof(c));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue