[Libreoffice-commits] core.git: emfio/source
Caolán McNamara
caolanm at redhat.com
Sat Oct 21 22:44:35 UTC 2017
emfio/source/emfuno/xemfparser.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit b19e1a145bcdaab7ccd4c4c84dd3bd9795403cd5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 21 18:40:57 2017 +0100
check emf seek
Change-Id: Iace6ac3f56f2496bc43d8f2cdad630a35bc935a2
Reviewed-on: https://gerrit.libreoffice.org/43671
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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);
More information about the Libreoffice-commits
mailing list