use sizeof

This commit is contained in:
Philippe Teuwen 2019-04-09 20:05:27 +02:00
parent ff194eb861
commit 2f33682035

View file

@ -1242,7 +1242,7 @@ int CmdHF15Write(const char *Cmd) {
char *cmd = cmdbuf; char *cmd = cmdbuf;
char *cmd2; char *cmd2;
strncpy(cmd, Cmd, 99); strncpy(cmd, Cmd, sizeof(cmdbuf) - 1);
if (!prepareHF15Cmd(&cmd, &c, ISO15_CMD_WRITE)) if (!prepareHF15Cmd(&cmd, &c, ISO15_CMD_WRITE))
return 0; return 0;