[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:47:28 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=77616c3
The following commit has been merged in the master branch:
commit 77616c3204bc65028129edbc3375c8671fe551cb
Author: Robin Mills <robin at clanmills.com>
Date: Fri Apr 14 19:42:53 2017 +0000
#1289 Thanks to Asdiel (AlienSkin) for reporting this and providing a test file. Thanks to Ben for investigation and patch.
---
src/image.cpp | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/image.cpp b/src/image.cpp
index 7a5d2d2..0d82804 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -374,6 +374,13 @@ namespace Exiv2 {
uint32_t count = byteSwap4(dir,4,bSwap);
uint32_t offset = byteSwap4(dir,8,bSwap);
+ // Break for unknown tag types else we may get segfault.
+ if ( !typeValid(type) ) {
+ std::cerr << "invalid type value detected in Image::printIFDStructure: " << type << std::endl;
+ start = 0; // break from do loop
+ break; // break from for loop
+ }
+
std::string sp = "" ; // output spacer
//prepare to print the value
@@ -391,12 +398,6 @@ namespace Exiv2 {
: 1
;
- // Break for unknown tag types else we may get segfault.
- if ( !typeValid(type) ) {
- std::cerr << "invalid type value detected in Image::printIFDStructure: " << type << std::endl;
- break;
- }
-
// if ( offset > io.size() ) offset = 0; // Denial of service?
DataBuf buf(size*count + pad+20); // allocate a buffer
std::memcpy(buf.pData_,dir.pData_+8,4); // copy dir[8:11] into buffer (short strings)
@@ -486,14 +487,16 @@ namespace Exiv2 {
out.write((const char*)buf.pData_,count);
}
}
- io.read(dir.pData_, 4);
- start = tooBig ? 0 : byteSwap4(dir,0,bSwap);
- out.flush();
+ if ( start ) {
+ io.read(dir.pData_, 4);
+ start = tooBig ? 0 : byteSwap4(dir,0,bSwap);
+ }
} while (start) ;
if ( bPrint ) {
out << Internal::indent(depth) << "END " << io.path() << std::endl;
}
+ out.flush();
depth--;
}
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list