summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-21 15:08:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-21 18:00:04 +0200
commitdc2b9e014ba81d6a244d0824e9c3b34fc38de884 (patch)
treeda28f40f2c6ffe21d4ac97baf112606e15d86b42 /sd
parentead920a48aa8c35075fdb980b9d213ff1c580dd1 (diff)
check seek
Change-Id: I610a650caaffe6510c1a13831b810f1dd0eab8ae Reviewed-on: https://gerrit.libreoffice.org/43656 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/ppt/propread.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 857912fdf8d5..e473e1566e31 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -587,10 +587,12 @@ void PropRead::Read()
sal_uInt32 nSectionOfs(0);
mpSvStream->ReadUInt32( nSectionOfs );
sal_uInt32 nCurrent = mpSvStream->Tell();
- mpSvStream->Seek( nSectionOfs );
- Section aSection(aSectCLSID.data());
- aSection.Read( mpSvStream.get() );
- maSections.push_back( o3tl::make_unique<Section>( aSection ) );
+ if (checkSeek(*mpSvStream, nSectionOfs))
+ {
+ Section aSection(aSectCLSID.data());
+ aSection.Read(mpSvStream.get());
+ maSections.push_back(o3tl::make_unique<Section>(aSection));
+ }
mpSvStream->Seek( nCurrent );
}
}