libvisio/libvisio-0.0.16-nothrow.patch |   31 +++++++++++++++++++++++++++++++
 libvisio/makefile.mk                   |    1 +
 2 files changed, 32 insertions(+)

New commits:
commit 28163aaf819b49fe0d271b1155196977579a2734
Author: Fridrich Å trba <fridrich.st...@bluewin.ch>
Date:   Wed May 16 15:24:04 2012 +0200

    Let VSD typedetection not throw
    
    Change-Id: Ifdb4cff2e2cbc05b694db31fcaf381186ec1b830
    Signed-off-by: Michael Meeks <michael.me...@suse.com>
    Signed-off-by: Eilidh McAdam <tibbylic...@gmail.com>
    Signed-off-by: Bjoern Michaelsen <bjoern.michael...@canonical.com>

diff --git a/libvisio/libvisio-0.0.16-nothrow.patch 
b/libvisio/libvisio-0.0.16-nothrow.patch
new file mode 100644
index 0000000..42b8efe
--- /dev/null
+++ b/libvisio/libvisio-0.0.16-nothrow.patch
@@ -0,0 +1,31 @@
+--- misc/libvisio-0.0.16/src/lib/VisioDocument.cpp     2012-04-13 
10:54:19.000000000 +0200
++++ misc/build/libvisio-0.0.16/src/lib/VisioDocument.cpp       2012-05-16 
15:16:08.974375389 +0200
+@@ -45,10 +45,13 @@
+ */
+ bool libvisio::VisioDocument::isSupported(WPXInputStream *input)
+ {
++  WPXInputStream *tmpDocStream = 0;
++  try
++  {
+   input->seek(0, WPX_SEEK_SET);
+   if (!input->isOLEStream())
+     return false;
+-  WPXInputStream *tmpDocStream = input->getDocumentOLEStream("VisioDocument");
++    tmpDocStream = input->getDocumentOLEStream("VisioDocument");
+   if (!tmpDocStream)
+     return false;
+ 
+@@ -64,6 +67,13 @@
+   {
+     return true;
+   }
++  }
++  catch (...)
++  {
++    if (tmpDocStream)
++      delete tmpDocStream;
++    return false;
++  }
+ 
+   return false;
+ }
diff --git a/libvisio/makefile.mk b/libvisio/makefile.mk
index f428918..2a1be7e 100644
--- a/libvisio/makefile.mk
+++ b/libvisio/makefile.mk
@@ -58,6 +58,7 @@ TARFILE_NAME=libvisio-0.0.16
 TARFILE_MD5=2fa6028324347860e684e75310818d43
 
 PATCH_FILES=\
+    $(TARFILE_NAME)-nothrow.patch \
     $(TARFILE_NAME).patch
 
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to