From: fennecdjay Date: Mon, 14 Oct 2019 23:25:11 +0000 (+0200) Subject: :art: Use memcpy instead of strcpy when truncating X-Git-Tag: nightly~2144 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=0e5ca414d0eacf967b45b4ddd9d9e9eea4d37737;p=gwion.git :art: Use memcpy instead of strcpy when truncating --- 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); }