summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 80b4636e..a7afcbf8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -189,7 +189,8 @@ static void parse_config(GKeyFile *config)
g_clear_error(&err);
} else {
debug("deviceid=%s", str);
- strncpy(main_opts.deviceid, str, sizeof(main_opts.deviceid));
+ strncpy(main_opts.deviceid, str,
+ sizeof(main_opts.deviceid) - 1);
g_free(str);
}