ooo-build r11644 - in trunk: . patches/src680



Author: jholesovsky
Date: Wed Feb 20 15:25:20 2008
New Revision: 11644
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11644&view=rev

Log:
2008-02-20  Jan Holesovsky  <kendy suse cz>

        * patches/src680/webdav-locking-catch-flush-exceptions.diff,
          patches/src680/apply: Stream's flush() can throw, but nobody is
          really catching it - fix this.


Added:
   trunk/patches/src680/webdav-locking-catch-flush-exceptions.diff
Modified:
   trunk/ChangeLog
   trunk/patches/src680/apply

Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply	(original)
+++ trunk/patches/src680/apply	Wed Feb 20 15:25:20 2008
@@ -584,6 +584,9 @@
 # Fix Save As
 webdav-locking-save-as.diff, i#29152, jholesov
 
+# Catch possible exceptions in flush(), otherwise can crash
+webdav-locking-catch-flush-exceptions.diff, n#363093, i#29152, jholesov
+
 [ GnomeVFS < ooh680-m4 ]
 # WebDAV locking
 # It is in this section because it needs part of the gvfs-related patches

Added: trunk/patches/src680/webdav-locking-catch-flush-exceptions.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/webdav-locking-catch-flush-exceptions.diff	Wed Feb 20 15:25:20 2008
@@ -0,0 +1,19 @@
+diff --git unotools/source/ucbhelper/ucblockbytes.cxx unotools/source/ucbhelper/ucblockbytes.cxx
+index 032888b..0586ec7 100644
+--- unotools/source/ucbhelper/ucblockbytes.cxx
++++ unotools/source/ucbhelper/ucblockbytes.cxx
+@@ -1605,7 +1605,13 @@ ErrCode UcbLockBytes::Flush() const
+     Reference <XOutputStream > xOutputStream = getOutputStream_Impl();
+     if ( !xOutputStream.is() )
+         return ERRCODE_IO_CANTWRITE;
+-    xOutputStream->flush();
++    try {
++        xOutputStream->flush();
++    }
++    catch (...)
++    {
++        return ERRCODE_IO_CANTWRITE;
++    }
+     return ERRCODE_NONE;
+ }
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]