From 48a109e8c8a9b0038dcb0c295a15ee70a1cea9ee Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jun 2022 18:41:18 -0600 Subject: [PATCH] fix snprintf buffer size warning --- libs/pbd/file_archive.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/pbd/file_archive.cc b/libs/pbd/file_archive.cc index 158ae68e51..410426fc97 100644 --- a/libs/pbd/file_archive.cc +++ b/libs/pbd/file_archive.cc @@ -472,8 +472,8 @@ FileArchive::create (const std::map& 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); }