summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-21 18:40:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-22 00:44:14 +0200
commitb19e1a145bcdaab7ccd4c4c84dd3bd9795403cd5 (patch)
treecec3a8b139de52e766866d86ce54474039c5c19a /emfio
parent118a0a3734a3f794c67a9d7d4376d8ed78a96fee (diff)
check emf seek
Change-Id: Iace6ac3f56f2496bc43d8f2cdad630a35bc935a2 Reviewed-on: https://gerrit.libreoffice.org/43671 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 'emfio')
-rw-r--r--emfio/source/emfuno/xemfparser.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/emfio/source/emfuno/xemfparser.cxx b/emfio/source/emfuno/xemfparser.cxx
index 0e96b0515856..2f1db153b422 100644
--- a/emfio/source/emfuno/xemfparser.cxx
+++ b/emfio/source/emfuno/xemfparser.cxx
@@ -126,14 +126,14 @@ namespace emfio
// rough check - import and conv to primitive
GDIMetaFile aMtf;
std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream(xEmfStream));
- sal_uInt32 nMetaType(0);
sal_uInt32 nOrgPos = pStream->Tell();
SvStreamEndian nOrigNumberFormat = pStream->GetEndian();
pStream->SetEndian(SvStreamEndian::LITTLE);
- pStream->Seek(0x28);
- pStream->ReadUInt32(nMetaType);
+ sal_uInt32 nMetaType(0);
+ if (checkSeek(*pStream, 0x28))
+ pStream->ReadUInt32(nMetaType);
pStream->Seek(nOrgPos);
bool bReadError(false);