]> Nishi Git Mirror - gwion.git/commitdiff
:art: Use memcpy instead of strcpy when truncating
authorfennecdjay <astor.jeremie@wanadoo.fr>
Mon, 14 Oct 2019 23:25:11 +0000 (01:25 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Mon, 14 Oct 2019 23:25:11 +0000 (01:25 +0200)
src/lib/import.c

index 0744743ce9967f2f5159cfd1939e83ffc4981a2d..8baf4ab03c11a43b8346ee1cd6ff09f3c6ae99f0 100644 (file)
@@ -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);
 }