From: Kevin Day Date: Sun, 21 Jul 2019 21:03:28 +0000 (-0500) Subject: Update: use memcpy instead of strncat X-Git-Tag: 0.5.0~519 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=254767604388d11fd1870f859c3974f151a4669e;p=fll Update: use memcpy instead of strncat --- diff --git a/level_1/fl_directory/c/directory.c b/level_1/fl_directory/c/directory.c index 86c6a4b..407be38 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++; }