From a25605dd821b872330cd0706a4200f415348f8ec Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 21 Jul 2019 16:03:28 -0500 Subject: [PATCH] Update: use memcpy instead of strncat --- level_1/fl_directory/c/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/level_1/fl_directory/c/directory.c b/level_1/fl_directory/c/directory.c index 5a6cad3..c8e47d6 100644 --- a/level_1/fl_directory/c/directory.c +++ b/level_1/fl_directory/c/directory.c @@ -44,7 +44,7 @@ extern "C"{ return status; } - strncat(names->array[names->used].string, listing[counter]->d_name, size); + memcpy(names->array[names->used].string, listing[counter]->d_name, sizeof(f_autochar) * size); names->array[names->used].used = size; names->used++; } -- 1.8.3.1