[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-4' - vcl/source

2016-12-19 Thread Caolán McNamara
 vcl/source/filter/wmf/winwmf.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 014394f10a11a1b36f8a2e8a0722ec2fddf74b40
Author: Caolán McNamara 
Date:   Fri Dec 9 15:26:59 2016 +

oss-fuzz we don't want this stream to automatically resize on seeks past end

Change-Id: Ie42b2e173cd3ed9faaf17c3c978227613129fa84
(cherry picked from commit f212bd45a7c7d97fb16380cd9fa7c6abbfb71e05)
(cherry picked from commit b832d7019f7e7499f5fb3da5d5f49ddbf0f35585)
Reviewed-on: https://gerrit.libreoffice.org/31803
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 88ab38f..c4f7e78 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -1093,7 +1093,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
 {   // first EMF comment
 nEMFRecCount= nComRecCount;
 nEMFSize= nEMFTotalSize;
-pEMFStream = 
o3tl::make_unique( nEMFSize );
+pEMFStream = 
o3tl::make_unique(nEMFSize, 0);
 }
 else if( ( nEMFRecCount != nComRecCount ) || ( 
nEMFSize != nEMFTotalSize ) ) // add additional checks here
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-4' - vcl/source

2016-12-13 Thread Marco Cecchetti
 vcl/source/gdi/pdfextoutdevdata.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 0c937f5d692477371bf2fe367a710f0899e36c33
Author: Marco Cecchetti 
Date:   Fri Nov 25 10:23:31 2016 +0100

tdf#101458 - check PNG for adequate compression

Change-Id: I7131d3b721ebb4d47b0bb43f09fcb9767f8ac6d8
Reviewed-on: https://gerrit.libreoffice.org/31190
Reviewed-by: Marco Cecchetti 
Tested-by: Marco Cecchetti 
(cherry picked from commit d96781383747299443f61e027285d54ffd5bc5c8)
Reviewed-on: https://gerrit.libreoffice.org/31412
(cherry picked from commit 1fd5c8080c47e75fff4aa377540ced29142da146)
Reviewed-on: https://gerrit.libreoffice.org/31605
Reviewed-by: Michael Meeks 
Reviewed-by: Eike Rathke 
Tested-by: jan iversen 
Reviewed-by: jan iversen 

diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx 
b/vcl/source/gdi/pdfextoutdevdata.cxx
index 1a58c90..811d618 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -420,9 +420,10 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, 
sal_uInt32& rCurGDIMtfAc
 if ( !mbGroupIgnoreGDIMtfActions )
 mCurrentGraphic = rGraphic;
 }
-else if ( eType == GFX_LINK_TYPE_NATIVE_PNG )
+else if ( eType == GFX_LINK_TYPE_NATIVE_PNG && 
mParaRects.size() >= 2 )
 {
-mCurrentGraphic = rGraphic;
+if ( 
rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) )
+mCurrentGraphic = rGraphic;
 }
 }
 break;
@@ -805,7 +806,7 @@ bool PDFExtOutDevData::HasAdequateCompression( const 
Graphic &rGraphic,
 {
 bool bReduceResolution = false;
 
-assert( rGraphic.IsLink() && rGraphic.GetLink().GetType() == 
GFX_LINK_TYPE_NATIVE_JPG );
+assert( rGraphic.IsLink() && (rGraphic.GetLink().GetType() == 
GFX_LINK_TYPE_NATIVE_JPG || rGraphic.GetLink().GetType() == 
GFX_LINK_TYPE_NATIVE_PNG));
 
 // small items better off as PNG anyway
 if ( rGraphic.GetSizePixel().Width() < 32 &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits