From 2fbbfc61c0cefcd09a8d4ea2d0327c1bcd151873 Mon Sep 17 00:00:00 2001 From: fef Date: Thu, 15 Jul 2021 23:10:57 +0200 Subject: [PATCH] string: use memcpy instead of strncpy in nstrmul --- src/string/nstrmul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string/nstrmul.c b/src/string/nstrmul.c index 7389156..4f20bf1 100644 --- a/src/string/nstrmul.c +++ b/src/string/nstrmul.c @@ -57,7 +57,7 @@ string *nchrmul(nchar c, usize n, error *err) char *pos = multiplied; while (n-- != 0) { - strncpy(pos, &s[0], s_size); + memcpy(pos, &s[0], s_size); pos += s_size; }