From a9404154bcfd9ac33d1c39938dea17cd72cdadb4 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Thu, 6 Dec 2018 21:21:44 +0000 Subject: [PATCH] Fix: https://github.com/Exiv2/exiv2/issues/585 --- src/bigtiffimage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bigtiffimage.cpp b/src/bigtiffimage.cpp index 2ada4fb6..cb4ace63 100644 --- a/src/bigtiffimage.cpp +++ b/src/bigtiffimage.cpp @@ -361,7 +361,7 @@ namespace Exiv2 const size_t restore = io.tell(); io.seek(offset, BasicIo::beg); // position - std::vector bytes(count) ; // allocate memory + std::vector bytes((size_t)count) ; // allocate memory // TODO: once we have C++11 use bytes.data() const long read_bytes = io.read(&bytes[0], static_cast(count)); io.seek(restore, BasicIo::beg); @@ -382,7 +382,7 @@ namespace Exiv2 if ( ::strcmp("Nikon",chars) == 0 ) { // tag is an embedded tiff - std::vector nikon_bytes(count - jump); + std::vector nikon_bytes((size_t)(count - jump)); io.read(&nikon_bytes.at(0), (long)nikon_bytes.size()); MemIo memIo(&nikon_bytes.at(0), (long)count - jump); // create a file