aboutsummaryrefslogtreecommitdiff
path: root/tests/checkfs/checkfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/checkfs/checkfs.c')
-rw-r--r--tests/checkfs/checkfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/checkfs/checkfs.c b/tests/checkfs/checkfs.c
index 3e34cc4..203ad5c 100644
--- a/tests/checkfs/checkfs.c
+++ b/tests/checkfs/checkfs.c
@@ -512,7 +512,8 @@ static void processCmdLine(int argc, char **argv)
{
if(strcmp(argv[cnt], CMDLINE_PORT) == 0)
{
- strncpy(SerialDevice, argv[++cnt], sizeof(SerialDevice));
+ strncpy(SerialDevice, argv[++cnt], sizeof(SerialDevice) - 1);
+ SerialDevice[sizeof(SerialDevice) - 1] = '\0';
continue;
}else
if(strcmp(argv[cnt], CMDLINE_MAXFILEBYTES) == 0)