filter/source/msfilter/msdffimp.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
New commits: commit 421e12dcc6d20885669ec75aa39b0fa760be7908 Author: Caolán McNamara <caol...@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 <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@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 );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits