From 63b32ba3fb76c1820b1193e9aa4eda02198ee41a Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 11 Feb 2023 16:43:14 -0800 Subject: [PATCH] fix wrong snprintf format Signed-off-by: Rosen Penev --- src/iptc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iptc.cpp b/src/iptc.cpp index fa843647..9d8e19c7 100644 --- a/src/iptc.cpp +++ b/src/iptc.cpp @@ -292,7 +292,7 @@ void IptcData::printStructure(std::ostream& out, const Slice& bytes, size uint16_t dataset = bytes.at(i + 2); Internal::enforce(bytes.size() - i >= 5, ErrorCode::kerCorruptedMetadata); uint16_t len = getUShort(bytes.subSlice(i + 3, bytes.size()), bigEndian); - snprintf(buff, sizeof(buff), " %6d | %7d | %-24s | %6d | ", record, dataset, + snprintf(buff, sizeof(buff), " %6hu | %7hu | %-24s | %6hu | ", record, dataset, Exiv2::IptcDataSets::dataSetName(dataset, record).c_str(), len); Internal::enforce(bytes.size() - i >= 5 + static_cast(len), ErrorCode::kerCorruptedMetadata);