From 0e5ca414d0eacf967b45b4ddd9d9e9eea4d37737 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 15 Oct 2019 01:25:11 +0200 Subject: [PATCH] :art: Use memcpy instead of strcpy when truncating --- src/lib/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/import.c b/src/lib/import.c index 0744743c..8baf4ab0 100644 --- a/src/lib/import.c +++ b/src/lib/import.c @@ -149,7 +149,7 @@ ANN ID_List str2list(const Env env, const m_str path, } *array_depth = depth; char curr[sz + 1]; - strncpy(curr, path, len); + memcpy(curr, path, len); curr[len] = '\0'; return path_valid(env, curr, pos); } -- 2.43.0