summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt_aux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index acafb713..ca8ccfbd 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -1240,7 +1240,7 @@ static void igt_save_module_param(const char *name, const char *file_path)
data = calloc(1, sizeof (*data));
igt_assert(data);
- strncpy(data->name, name, PARAM_NAME_MAX_SZ);
+ strncpy(data->name, name, PARAM_NAME_MAX_SZ - 1);
fd = open(file_path, O_RDONLY);
igt_assert(fd >= 0);