From c47542fcd9013bff0fead916ff78df1126594335 Mon Sep 17 00:00:00 2001 From: GreekStapler Date: Sat, 28 Jan 2023 09:57:38 +0000 Subject: [PATCH] fix: strcat can not be used on uninitialised strings. --- src/package/package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package/package.c b/src/package/package.c index 8d1565d..f5f4ee5 100644 --- a/src/package/package.c +++ b/src/package/package.c @@ -141,7 +141,7 @@ char *package_to_description(Pkg *pkg) { // assuming .pkg.tar.zst; other formats are valid, this should account for that snprintf(aux, SMALL_BUFF_SIZE, "%%FILENAME%%\n%s-%s-%s.pkg.tar.zst", pkg_info->name, pkg_info->version, pkg_info->arch); - strcat(description, aux); + strcpy(description, aux); ADD_STRING("\n\n%%NAME%%\n%s", name); ADD_STRING("\n\n%%BASE%%\n%s", base);