summaryrefslogtreecommitdiffstats
path: root/src/lid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lid.c')
-rw-r--r--src/lid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lid.c b/src/lid.c
index cd307c0..8a31268 100644
--- a/src/lid.c
+++ b/src/lid.c
@@ -1042,7 +1042,7 @@ query_ambiguous_prefix (unsigned int limit, report_func_t report_func)
{
if (consecutive && key_style != ks_token)
{
- strncpy (&name[1], old, limit);
+ stzncpy (&name[1], old, limit - 2);
(*report_func) (name, bits_to_flinkv (bits_vec));
}
consecutive = 0;
@@ -1064,7 +1064,7 @@ query_ambiguous_prefix (unsigned int limit, report_func_t report_func)
}
if (consecutive && key_style != ks_token)
{
- strncpy (&name[1], new, limit);
+ stzncpy (&name[1], new, limit - 2);
(*report_func) (name, bits_to_flinkv (bits_vec));
}
return count;