diff --git a/programs/fileio.c b/programs/fileio.c index 39b2c741..5f10958d 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -1011,8 +1011,8 @@ int FIO_compressMultipleFilenames(const char** inFileNamesTable, unsigned nbFile if (!dstFileName) { EXM_THROW(30, "zstd: %s", strerror(errno)); } } - strcpy(dstFileName, inFileNamesTable[u]); - strcat(dstFileName, suffix); + strncpy(dstFileName, inFileNamesTable[u], ifnSize+1 /* Include null */); + strncat(dstFileName, suffix, suffixSize); missed_files += FIO_compressFilename_dstFile(ress, dstFileName, inFileNamesTable[u], compressionLevel); } } diff --git a/tests/.gitignore b/tests/.gitignore index 4911b2d6..da536251 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -26,6 +26,7 @@ invalidDictionaries checkTag zcat zstdcat +tm # Tmp test directory zstdtest