summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-01 09:13:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-01 21:18:48 +0100
commitf203f834b1855dc1dc90766d19082f7f91bec074 (patch)
treec411f6c8427e7b3be43b1215a9d391a06057a5fc /sd
parent0a1d5af2a18d6a062c45d65689fbce619922dcc8 (diff)
ofz#6625 just don't care about exceptions during fuzzing
Change-Id: I41cc7491529d2486d96cb3893e6a3b4e5713d078 Reviewed-on: https://gerrit.libreoffice.org/50585 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/pptin.cxx36
1 files changed, 17 insertions, 19 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 5befe39a9526..3e8c16943e92 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2763,36 +2763,34 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool ImportPPT(
extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportPPT(SvStream &rStream)
{
- tools::SvRef<SotStorage> xStorage;
+ bool bRet = false;
try
{
- xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
+ tools::SvRef<SotStorage> xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
if (xStorage->GetError())
return false;
- }
- catch (...)
- {
- return false;
- }
-
- tools::SvRef<SotStorageStream> xDocStream(xStorage->OpenSotStream( "PowerPoint Document", StreamMode::STD_READ));
- if ( !xDocStream.is() )
- return false;
- SdDLL::Init();
+ tools::SvRef<SotStorageStream> xDocStream(xStorage->OpenSotStream( "PowerPoint Document", StreamMode::STD_READ));
+ if ( !xDocStream.is() )
+ return false;
- SfxMedium aSrcMed("", StreamMode::STD_READ);
+ SdDLL::Init();
- xDocStream->SetVersion(xStorage->GetVersion());
- xDocStream->SetCryptMaskKey(xStorage->GetKey());
+ SfxMedium aSrcMed("", StreamMode::STD_READ);
- ::sd::DrawDocShellRef xDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false, DocumentType::Impress);
- SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ xDocStream->SetVersion(xStorage->GetVersion());
+ xDocStream->SetCryptMaskKey(xStorage->GetKey());
- bool bRet = ImportPPT(pDoc, *xDocStream, *xStorage, aSrcMed);
+ ::sd::DrawDocShellRef xDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false, DocumentType::Impress);
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
- xDocShRef->DoClose();
+ bRet = ImportPPT(pDoc, *xDocStream, *xStorage, aSrcMed);
+ xDocShRef->DoClose();
+ }
+ catch (...)
+ {
+ }
return bRet;
}