summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorHubert Figuiere <hub@figuiere.net>2009-06-30 12:40:42 -0400
committerHubert Figuiere <hub@figuiere.net>2009-06-30 12:40:42 -0400
commitc6412cfe979e6b44a124f61f4b020e37a06569ad (patch)
treee8ad330d187f27c6562fa9432960990e778cad6d /source
parentec1e1c2938d3d0185640714cda989ea526864e43 (diff)
Bug #22554: Fix a SIGFPE encountered on some invalid files. (Bug GNOME #586720)
Diffstat (limited to 'source')
-rw-r--r--source/XMPFiles/FormatSupport/TIFF_MemoryReader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/XMPFiles/FormatSupport/TIFF_MemoryReader.cpp b/source/XMPFiles/FormatSupport/TIFF_MemoryReader.cpp
index 4ca9cac..cb483e7 100644
--- a/source/XMPFiles/FormatSupport/TIFF_MemoryReader.cpp
+++ b/source/XMPFiles/FormatSupport/TIFF_MemoryReader.cpp
@@ -201,6 +201,9 @@ bool TIFF_MemoryReader::GetTag ( XMP_Uns8 ifd, XMP_Uns16 id, TagInfo* info ) con
{
const TweakedIFDEntry* thisTag = this->FindTagInIFD ( ifd, id );
if ( thisTag == 0 ) return false;
+ // this type isn't valid and leads to a size of 0 causing a SIGFPE.
+ // just ignore it.
+ if ( thisTag->type == kTIFF_ShortOrLongType ) return false;
if ( info != 0 ) {