Kaydet (Commit) b19e1a14 authored tarafından Caolán McNamara's avatar Caolán McNamara

check emf seek

Change-Id: Iace6ac3f56f2496bc43d8f2cdad630a35bc935a2
Reviewed-on: https://gerrit.libreoffice.org/43671Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 118a0a37
...@@ -126,14 +126,14 @@ namespace emfio ...@@ -126,14 +126,14 @@ namespace emfio
// rough check - import and conv to primitive // rough check - import and conv to primitive
GDIMetaFile aMtf; GDIMetaFile aMtf;
std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream(xEmfStream)); std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream(xEmfStream));
sal_uInt32 nMetaType(0);
sal_uInt32 nOrgPos = pStream->Tell(); sal_uInt32 nOrgPos = pStream->Tell();
SvStreamEndian nOrigNumberFormat = pStream->GetEndian(); SvStreamEndian nOrigNumberFormat = pStream->GetEndian();
pStream->SetEndian(SvStreamEndian::LITTLE); pStream->SetEndian(SvStreamEndian::LITTLE);
pStream->Seek(0x28); sal_uInt32 nMetaType(0);
pStream->ReadUInt32(nMetaType); if (checkSeek(*pStream, 0x28))
pStream->ReadUInt32(nMetaType);
pStream->Seek(nOrgPos); pStream->Seek(nOrgPos);
bool bReadError(false); bool bReadError(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment