Blob Blame History Raw
From 738528d790b2b1d52d9b72d673842969a852815d Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 18 Jan 2018 10:48:52 +0100
Subject: [PATCH 2/2] return early if the time part is empty

---
 src/libcmis/xml-utils.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcmis/xml-utils.cxx b/src/libcmis/xml-utils.cxx
index d20ff47..6363af8 100644
--- a/src/libcmis/xml-utils.cxx
+++ b/src/libcmis/xml-utils.cxx
@@ -385,5 +385,8 @@ namespace libcmis
 
         size_t teePos = dateTimeStr.find( 'T' );
+        if ( teePos == string::npos || teePos == dateTimeStr.size() - 1 )
+            return t; // obviously not a time
+ 
         string noTzStr = dateTimeStr.substr( 0, teePos + 1 );
 
         string timeStr = dateTimeStr.substr( teePos + 1 );
-- 
2.14.3