summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-05-16 15:07:44 +0200
committerPetr Mladek <pmladek@suse.cz>2013-05-23 17:48:44 +0200
commitbeaf5346706ac859e0b0f3cf63b4dbb35fc6c830 (patch)
treeea6bcd8559310ea8194e94099bf7ba02fb56348d
parent306aedc037f1e0a5376e700fb611f3e76ac0052c (diff)
fdo#64577, CMIS: fixed crasher in libcmis
The crash is handled, but the huge files' size won't be properly handled on 32bits builds: would require a libcmis API change. Change-Id: I8ef1190a4d1de7d91a67ec20330db9e1747dfdc2 (cherry picked from commit 7a6f5186a8e4089181f57af44fa4654fe692856b) Reviewed-on: https://gerrit.libreoffice.org/3921 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--libcmis/libcmis-0.3.0.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/libcmis/libcmis-0.3.0.patch b/libcmis/libcmis-0.3.0.patch
index d9dc70f6a40d..37644c8ed76d 100644
--- a/libcmis/libcmis-0.3.0.patch
+++ b/libcmis/libcmis-0.3.0.patch
@@ -20,3 +20,16 @@ index e8efd67..decb79a 100644
xmlTextWriterEndElement( writer ); // End of Expires
xmlTextWriterEndElement( writer ); // End of Timestamp
+diff --git src/libcmis/document.cxx src/libcmis/document.cxx
+index 7c2a8e6..e7014cb 100644
+--- src/libcmis/document.cxx
++++ src/libcmis/document.cxx
+@@ -78,7 +78,7 @@ namespace libcmis
+ {
+ long contentLength = 0;
+ map< string, libcmis::PropertyPtr >::const_iterator it = getProperties( ).find( string( "cmis:contentStreamLength" ) );
+- if ( it != getProperties( ).end( ) && !it->second->getStrings( ).empty( ) )
++ if ( it != getProperties( ).end( ) && !it->second->getLongs( ).empty( ) )
+ contentLength = it->second->getLongs( ).front( );
+ return contentLength;
+ }