From 14d6a07abd7685d8867731938d4c8c3483672909 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 21 Nov 2019 12:17:04 +0000 Subject: ofz#19034 fix ~infinite loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibc90b3b68a55f8396fbe623eb0db6c289fe978a1 Reviewed-on: https://gerrit.libreoffice.org/83383 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- filter/source/msfilter/msdffimp.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index ebe405aefb9d..10a0ca1f6382 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6241,7 +6241,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt, // search for the Blip Property! sal_uLong nPropRead = 0; nLenShapePropTbl = nLength; - long nStartShapePropTbl = rSt.Tell(); + auto nStartShapePropTbl = rSt.Tell(); do { sal_uInt16 nPropId(0); @@ -6324,7 +6324,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt, break; } } - while( nPropRead < nLenShapePropTbl ); + while (rSt.good() && nPropRead < nLenShapePropTbl); rSt.Seek( nStartShapePropTbl + nLenShapePropTbl ); nReadSpCont += nLenShapePropTbl; } -- cgit v1.2.3