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

Caolán McNamara caolanm at redhat.com
Sat Oct 21 19:09:15 UTC 2017


 filter/source/msfilter/msdffimp.cxx |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 421e12dcc6d20885669ec75aa39b0fa760be7908
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 21 18:36:45 2017 +0100

    check for sucessful seek
    
    Change-Id: I6da634ddd38f57eaef0eefca30f6d2c3867869c3
    Reviewed-on: https://gerrit.libreoffice.org/43670
    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/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 09c6c9dacc41..848295311b13 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5973,20 +5973,26 @@ void SvxMSDffManager::GetDrawingContainerData( SvStream& rSt, sal_uLong nLenDg,
     // we now have to iterate through all contained shape group containers
     do
     {
-        if(!ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength)) return;
+        if (!ReadCommonRecordHeader(rSt, nVer, nInst, nFbt, nLength))
+            return;
         nReadDg += DFF_COMMON_RECORD_HEADER_SIZE;
         // Patriarch found (the upmost shape group container) ?
-        if( DFF_msofbtSpgrContainer == nFbt )
+        if (DFF_msofbtSpgrContainer == nFbt)
         {
-            if(!GetShapeGroupContainerData( rSt, nLength, true, nDrawingContainerId )) return;
+            if (!GetShapeGroupContainerData(rSt, nLength, true, nDrawingContainerId))
+                return;
         }
         // empty Shape Container ? (outside of shape group container)
-        else if( DFF_msofbtSpContainer == nFbt )
+        else if (DFF_msofbtSpContainer == nFbt)
         {
-            if(!GetShapeContainerData( rSt, nLength, ULONG_MAX, nDrawingContainerId )) return;
+            if (!GetShapeContainerData(rSt, nLength, ULONG_MAX, nDrawingContainerId))
+                return;
         }
         else
-            rSt.SeekRel( nLength );
+        {
+            if (!checkSeek(rSt, rSt.Tell() + nLength))
+                return;
+        }
         nReadDg += nLength;
     }
     while( nReadDg < nLenDg );


More information about the Libreoffice-commits mailing list