]> 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:21:31 +0000 (16:21 -0500)
level_1/fl_directory/c/directory.c

index 86c6a4b97ad9e058faa797017ebe7064aa97c879..407be38925ecb23eb003f3602d4fde32fcc797fd 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++;
         }