From 2f33682035877819fad0af6b10ac9ba557d29f5c Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 9 Apr 2019 20:05:27 +0200 Subject: [PATCH] use sizeof --- client/cmdhf15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cmdhf15.c b/client/cmdhf15.c index 086039d13..faf77646a 100644 --- a/client/cmdhf15.c +++ b/client/cmdhf15.c @@ -1242,7 +1242,7 @@ int CmdHF15Write(const char *Cmd) { char *cmd = cmdbuf; char *cmd2; - strncpy(cmd, Cmd, 99); + strncpy(cmd, Cmd, sizeof(cmdbuf) - 1); if (!prepareHF15Cmd(&cmd, &c, ISO15_CMD_WRITE)) return 0;