13
0

fix snprintf buffer size warning

This commit is contained in:
Paul Davis 2022-06-21 18:41:18 -06:00
parent 660d2fc8ab
commit 48a109e8c8

View File

@ -472,8 +472,8 @@ FileArchive::create (const std::map<std::string, std::string>& filemap, Compress
if (compression_level != CompressNone) {
archive_write_add_filter_lzma (a);
char buf[48];
sprintf (buf, "lzma:compression-level=%u,lzma:threads=0", (uint32_t) compression_level);
char buf[64];
snprintf (buf, sizeof (buf), "lzma:compression-level=%u,lzma:threads=0", (uint32_t) compression_level);
archive_write_set_options (a, buf);
}