CmdHF15Write: make sure truncated string is null-terminated

This commit is contained in:
Philippe Teuwen 2019-04-09 20:02:33 +02:00
commit ff194eb861

View file

@ -1238,7 +1238,7 @@ int CmdHF15Write(const char *Cmd) {
UsbCommand c = {CMD_ISO_15693_COMMAND, {0, 1, 1}}; // len,speed,recv?
uint8_t *req = c.d.asBytes;
int reqlen = 0, pagenum, temp;
char cmdbuf[100];
char cmdbuf[100] = {0};
char *cmd = cmdbuf;
char *cmd2;