sw/source/filter/ww8/ww8par.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 9c56cbf6e9e2f72441920a91bf8c1a4803e7231d
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sat Jun 17 21:03:42 2017 +0100

    ofz#2289 catch bad storage exception
    
    Change-Id: I51b44a49eb05da0bf89ae2db7b5f2d4647c3ee87

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 22ca6889474d..1ce758822888 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6178,7 +6178,16 @@ bool SAL_CALL TestImportDOC(SvStream &rStream, const 
OUString &rFltName)
     pReader->pStrm = &rStream;
     if (rFltName != "WW6")
     {
-        xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
+        try
+        {
+            xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
+            if (xStorage->GetError())
+                return false;
+        }
+        catch (...)
+        {
+            return false;
+        }
         pReader->pStg = xStorage.get();
     }
     pReader->SetFltName(rFltName);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to