[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:38:17 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=b2e00c2
The following commit has been merged in the master branch:
commit b2e00c2d5384552bf11ad56e68b340fb0e5bbff1
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Thu Feb 8 15:29:42 2007 +0000
Improved RAF support to read thumbnail data which are outside of the Exif block.
---
src/rafimage.cpp | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/rafimage.cpp b/src/rafimage.cpp
index f1bf758..7dafc7f 100644
--- a/src/rafimage.cpp
+++ b/src/rafimage.cpp
@@ -89,20 +89,13 @@ namespace Exiv2 {
if (io_->error() || io_->eof()) throw Error(14);
throw Error(3, "RAF");
}
- if (io_->seek(84, BasicIo::beg) != 0) throw Error(14);
- byte tmp[4];
- io_->read(tmp, 4);
- if (io_->error() || io_->eof()) throw Error(14);
- uint32_t const pos = getULong(tmp, bigEndian) + 4;
- if (io_->seek(pos, BasicIo::beg) != 0) throw Error(14);
- io_->read(tmp, 2);
- if (io_->error() || io_->eof()) throw Error(14);
- DataBuf buf(getUShort(tmp, bigEndian) - 10);
- if (io_->seek(pos + 8, BasicIo::beg) != 0) throw Error(14);
- io_->read(buf.pData_, buf.size_);
- if (io_->error() || io_->eof()) throw Error(14);
+ byte const* pData = io_->mmap();
+ long size = io_->size();
+ if (size < 84 + 4) throw Error(14); // includes the test for -1
+ uint32_t const start = getULong(pData + 84, bigEndian) + 12;
+ if (static_cast<uint32_t>(size) < start) throw Error(14);
clearMetadata();
- TiffParser::decode(this, buf.pData_, buf.size_,
+ TiffParser::decode(this, pData + start, size - start,
TiffCreator::create, TiffDecoder::findDecoder);
} // RafImage::readMetadata
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list