[Libreoffice-commits] core.git: 2 commits - chart2/source vcl/qa vcl/source

Caolán McNamara caolanm at redhat.com
Wed Aug 12 09:01:19 PDT 2015


 chart2/source/controller/dialogs/DataBrowser.cxx      |    1 -
 vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-2.wmf |binary
 vcl/source/filter/wmf/enhwmf.cxx                      |    7 ++++---
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7ffe6aebb44ed3f7b5fd1ffe3ccfccf0f61984b3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 12 16:30:21 2015 +0100

    another avoid endless loop with busted wmf
    
    Change-Id: Ie4068fdc1e54e0ad3e55354938a4c5e1459e7fe0

diff --git a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-2.wmf b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-2.wmf
new file mode 100644
index 0000000..f8f1538
Binary files /dev/null and b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-2.wmf differ
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index ac4caa0..1ea6e21 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -637,14 +637,15 @@ bool EnhWMFReader::ReadEnhWMF()
             break;
         }
 
-        nNextPos = pWMF->Tell() + ( nRecSize - 8 );
-
-        if ( !pWMF->good() || nNextPos > nEndPos )
+        const sal_uInt32 nMaxPossibleRecSize = nEndPos - pWMF->Tell() + 8;
+        if (nRecSize > nMaxPossibleRecSize)
         {
             bStatus = false;
             break;
         }
 
+        nNextPos = pWMF->Tell() + ( nRecSize - 8 );
+
         if(  !aBmpSaveList.empty()
           && ( nRecType != EMR_STRETCHBLT )
           && ( nRecType != EMR_STRETCHDIBITS )
commit f5ace6b29e794aa9658da0fde4ed766d2b521cb2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 11 16:29:53 2015 +0100

    no need to set the help id twice
    
    Change-Id: Idb903eaacf35d7b826086aae0b56fb1f496c25da

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 3162e1d..1c9d0ad 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -214,7 +214,6 @@ SeriesHeader::SeriesHeader( vcl::Window * pParent, vcl::Window *pColorParent ) :
     m_spSeriesName->EnableUpdateData( 4 * EDIT_UPDATEDATA_TIMEOUT ); // define is in vcl/edit.hxx
     m_spSeriesName->SetUpdateDataHdl( LINK( this, SeriesHeader, SeriesNameChanged ));
     m_spSeriesName->SetModifyHdl( LINK( this, SeriesHeader, SeriesNameEdited ));
-    m_spSeriesName->SetHelpId( HID_SCH_DATA_SERIES_LABEL );
     Show();
 }
 


More information about the Libreoffice-commits mailing list