[Libreoffice-commits] core.git: external/libcmis
Thorsten Behrens
Thorsten.Behrens at CIB.de
Sun Dec 11 02:42:35 UTC 2016
external/libcmis/UnpackedTarball_cmis.mk | 1 +
external/libcmis/libcmis-fix-error-handling.patch | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit 1188061c25cb5aaa32193a78111fcbe2ef10eaf1
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date: Fri Dec 9 02:40:53 2016 +0100
libcmis: error handling for datetime string parser
Change-Id: Ie5be0307fa8ac0292f7692f9674e07776cb1948d
Reviewed-on: https://gerrit.libreoffice.org/31777
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/external/libcmis/UnpackedTarball_cmis.mk b/external/libcmis/UnpackedTarball_cmis.mk
index 8fb247f..2ba454f 100644
--- a/external/libcmis/UnpackedTarball_cmis.mk
+++ b/external/libcmis/UnpackedTarball_cmis.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cmis, \
external/libcmis/libcmis-fix-google-drive.patch \
external/libcmis/libcmis-google-2FA-implementation.patch \
external/libcmis/libcmis-sharepoint-repository-root.patch \
+ external/libcmis/libcmis-fix-error-handling.patch \
))
ifeq ($(OS)$(COM),WNTMSC)
diff --git a/external/libcmis/libcmis-fix-error-handling.patch b/external/libcmis/libcmis-fix-error-handling.patch
new file mode 100644
index 0000000..09df7ac
--- /dev/null
+++ b/external/libcmis/libcmis-fix-error-handling.patch
@@ -0,0 +1,20 @@
+diff -ur cmis.org/src/libcmis/xml-utils.cxx cmis/src/libcmis/xml-utils.cxx
+--- cmis.org/src/libcmis/xml-utils.cxx 2016-12-09 02:19:47.900961750 +0100
++++ cmis/src/libcmis/xml-utils.cxx 2016-12-09 02:23:56.392206339 +0100
+@@ -382,9 +382,14 @@
+ // Get the time zone offset
+ boost::posix_time::time_duration tzOffset( boost::posix_time::duration_from_string( "+00:00" ) );
+
++ if ( dateTimeStr.empty( ) )
++ return t; // obviously not a time
++
+ size_t teePos = dateTimeStr.find( 'T' );
+- string noTzStr = dateTimeStr.substr( 0, teePos + 1 );
++ if ( teePos == string::npos )
++ return t; // obviously not a time
+
++ string noTzStr = dateTimeStr.substr( 0, teePos + 1 );
+ string timeStr = dateTimeStr.substr( teePos + 1 );
+
+ // Get the TZ if any
+
More information about the Libreoffice-commits
mailing list