Fix CodeQL alert

This commit is contained in:
Lawrence Lee
2023-02-18 18:16:12 -08:00
parent 1bacb8b5b0
commit 006a7d9975

View File

@@ -773,7 +773,7 @@ private:
const std::size_t saved_position = std::ftell(file_) + 4;
// Load value field (possibly seek before)
const std::size_t value_size = tag.count * getTypeSize(tag.type);
const std::size_t value_size = static_cast<std::size_t>(tag.count) * getTypeSize(tag.type);
if (value_size > 4) {
if (std::fseek(file_, get4(), SEEK_SET) == -1) {