[Libreoffice-commits] core.git: filter/source

Caolán McNamara caolanm at redhat.com
Fri Oct 6 13:03:46 UTC 2017


 filter/source/graphicfilter/itiff/itiff.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 411f5e9cbd14bc3ffe7024b21434231662f6246d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 6 11:35:06 2017 +0100

    ofz#3566: fix oom
    
    Change-Id: Id5bf172d49c61ad8000a5917759a54eaa0c8467e
    Reviewed-on: https://gerrit.libreoffice.org/43195
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 0e27706c8fde..83dbc0b72424 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1374,7 +1374,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
                     nBytesPerRow = nRowSize;
             }
 
-            if ( bStatus )
+            if (bStatus)
             {
                 //sanity check consider ReadMap condition for last row and
                 //last plane
@@ -1441,7 +1441,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
                             bStatus = false;
                     }
                 }
-                else if ( nCompression == 5 )
+                else if (nCompression == 5)
                 {
                     sal_uInt32 np = nPlanes - 1;
                     if (np >= SAL_N_ELEMENTS(aMap))
@@ -1464,6 +1464,13 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
                             bStatus = false;
                     }
                 }
+                else if (nCompression == 32773)
+                {
+                }
+                else
+                {
+                    bStatus = false;
+                }
             }
 
             if ( bStatus )


More information about the Libreoffice-commits mailing list