diff options
author | Hubert Figuiere <hub@figuiere.net> | 2009-06-30 12:40:42 -0400 |
---|---|---|
committer | Hubert Figuiere <hub@figuiere.net> | 2009-06-30 12:40:42 -0400 |
commit | c6412cfe979e6b44a124f61f4b020e37a06569ad (patch) | |
tree | e8ad330d187f27c6562fa9432960990e778cad6d /source | |
parent | ec1e1c2938d3d0185640714cda989ea526864e43 (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.cpp | 3 |
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 ) { |