Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / external / libcmis / libcmis-fix-error-handling.patch
blob09df7ac9ebe53eef682f0d3dba0817c33d40c8d6
1 diff -ur cmis.org/src/libcmis/xml-utils.cxx cmis/src/libcmis/xml-utils.cxx
2 --- cmis.org/src/libcmis/xml-utils.cxx 2016-12-09 02:19:47.900961750 +0100
3 +++ cmis/src/libcmis/xml-utils.cxx 2016-12-09 02:23:56.392206339 +0100
4 @@ -382,9 +382,14 @@
5 // Get the time zone offset
6 boost::posix_time::time_duration tzOffset( boost::posix_time::duration_from_string( "+00:00" ) );
8 + if ( dateTimeStr.empty( ) )
9 + return t; // obviously not a time
11 size_t teePos = dateTimeStr.find( 'T' );
12 - string noTzStr = dateTimeStr.substr( 0, teePos + 1 );
13 + if ( teePos == string::npos )
14 + return t; // obviously not a time
16 + string noTzStr = dateTimeStr.substr( 0, teePos + 1 );
17 string timeStr = dateTimeStr.substr( teePos + 1 );
19 // Get the TZ if any