From 43be4d2034b0fb5e881a044af88f61586df469c1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 26 Nov 2017 20:45:10 +0000 Subject: ofz#4436 check if seek succeeded Change-Id: I56d9692647b28c706b56ccacf08d494b3d830d94 Reviewed-on: https://gerrit.libreoffice.org/45296 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 765ff606426251f90aff5d1fc89f01ed7594ed59) --- filter/source/msfilter/msdffimp.cxx | 5 ++++- sd/source/filter/ppt/pptin.cxx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 93f40cbbb6b1..fea172a4c20d 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6046,7 +6046,10 @@ bool SvxMSDffManager::GetShapeGroupContainerData( SvStream& rSt, return false; } else - rSt.SeekRel( nLength ); + { + if (!checkSeek(rSt, rSt.Tell() + nLength)) + return false; + } nReadSpGrCont += nLength; } while( nReadSpGrCont < nLenShapeGroupCont ); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 81d0e8044faa..69825ed88f3a 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -854,7 +854,7 @@ bool ImplSdPPTImport::Import() bool bSuccess = aHd.SeekToEndOfRecord(rStCtrl); if (!bSuccess) { - SAL_WARN("filter.ms", "Count not seek to end of record"); + SAL_WARN("filter.ms", "Could not seek to end of record"); break; } } -- cgit