]> Kevux Git Server - fll/commitdiff
Update: use memcpy instead of strncat
authorKevin Day <thekevinday@gmail.com>
Sun, 21 Jul 2019 21:03:28 +0000 (16:03 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 21 Jul 2019 21:03:28 +0000 (16:03 -0500)
level_1/fl_directory/c/directory.c

index 5a6cad3b0e8ed3862c50002010078b3d2a90bb44..c8e47d6594348b04eceaab4794ec5e4233362832 100644 (file)
@@ -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++;
         }