fix: strcat can not be used on uninitialised strings.

GreekStapler 2023-01-28 09:57:38 +00:00
parent b25da21fd1
commit c47542fcd9
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ char *package_to_description(Pkg *pkg) {
// assuming .pkg.tar.zst; other formats are valid, this should account for that // 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, snprintf(aux, SMALL_BUFF_SIZE, "%%FILENAME%%\n%s-%s-%s.pkg.tar.zst", pkg_info->name, pkg_info->version,
pkg_info->arch); pkg_info->arch);
strcat(description, aux); strcpy(description, aux);
ADD_STRING("\n\n%%NAME%%\n%s", name); ADD_STRING("\n\n%%NAME%%\n%s", name);
ADD_STRING("\n\n%%BASE%%\n%s", base); ADD_STRING("\n\n%%BASE%%\n%s", base);