filter/source/graphicfilter/itga/itga.cxx |    5 +++++
 include/sal/log-areas.dox                 |    1 +
 2 files changed, 6 insertions(+)

New commits:
commit 7f629f51df1f4fa37696c75e9d88b636b08baa0d
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Feb 14 14:27:47 2018 +0000

    ofz#6324 Out-of-memory
    
    Change-Id: I3dae862da134ef32ec16a230bc40befffff06ec2
    Reviewed-on: https://gerrit.libreoffice.org/49734
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/filter/source/graphicfilter/itga/itga.cxx 
b/filter/source/graphicfilter/itga/itga.cxx
index e980e3c20925..f5c8a43b6993 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -139,6 +139,11 @@ bool TGAReader::ReadTGA(Graphic & rGraphic)
         mbStatus = ImplReadHeader();
         if ( mbStatus )
         {
+            sal_Size nSize = mpFileHeader->nImageWidth;
+            nSize *= mpFileHeader->nImageHeight;
+            if (nSize > SAL_MAX_INT32/2)
+                return false;
+
             mpBitmap.reset( new vcl::bitmap::RawBitmap( Size( 
mpFileHeader->nImageWidth, mpFileHeader->nImageHeight ) ) );
             if ( mbIndexing )
                 mbStatus = ImplReadPalette();
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 5c2ee4774143..f81eb0564c52 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -231,6 +231,7 @@ certain functionality.
 @li @c filter.pict
 @li @c filter.ras
 @li @c filter.svg
+@li @c filter.tga
 @li @c filter.tiff
 @li @c filter.xmlfa
 @li @c filter.xslt - xslt import/export
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to