[Libreoffice-commits] core.git: 2 commits - external/icu svtools/source

Caolán McNamara caolanm at redhat.com
Fri Aug 29 01:28:09 PDT 2014


 external/icu/UnpackedTarball_icu.mk |    1 
 external/icu/icu4c-icu11131.patch.1 |   46 ++++++++++++++++++++++++++++++++++++
 svtools/source/control/ctrlbox.cxx  |    3 +-
 3 files changed, 49 insertions(+), 1 deletion(-)

New commits:
commit d54b2bd8dcc393bb168386a5c0ec4ce40bb3c6d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 29 09:27:01 2014 +0100

    Resolves: fdo#83068 ignore spaces in font-size unit detection
    
    Change-Id: Id9a5c2ee576bd533d8b0a2b4356e319354abbbac

diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 10f1049..097e73a 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -19,6 +19,7 @@
 
 #include <config_folders.h>
 
+#include <i18nutil/unicode.hxx>
 #include <tools/stream.hxx>
 #include <vcl/builder.hxx>
 #include <vcl/svapp.hxx>
@@ -1604,7 +1605,7 @@ void FontSizeBox::Modify()
             const sal_Unicode* pStr = aStr.getStr();
             while ( *pStr )
             {
-                if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') )
+                if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') && !unicode::isSpace(*pStr) )
                 {
                     if ( ('-' == *pStr || '+' == *pStr) && !bPtRelative )
                         bPtRelative = true;
commit f3cbb539e5d8e042432ab2ee9c90a3ad8c9ade5a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 29 09:21:03 2014 +0100

    icu#11131 coverity warnings
    
    Change-Id: I67d0b4b0c39c62646c7a0ae7152c7ca256680c38

diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index 3f9eda2..0f6ecd1 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
 	external/icu/icu-ubsan.patch.0 \
 	external/icu/icu4c-icu11054.patch.1 \
 	external/icu/icu4c-icu11100.patch.1 \
+	external/icu/icu4c-icu11131.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/icu/icu4c-icu11131.patch.1 b/external/icu/icu4c-icu11131.patch.1
new file mode 100644
index 0000000..58364b0
--- /dev/null
+++ b/external/icu/icu4c-icu11131.patch.1
@@ -0,0 +1,46 @@
+--- icu/source/i18n/smpdtfmt.cpp.orig	2014-08-27 10:29:29.849821672 +0530
++++ icu/source/i18n/smpdtfmt.cpp	2014-08-27 10:29:49.323821401 +0530
+@@ -1082,6 +1082,7 @@
+             }
+         } else {
+             status = U_MEMORY_ALLOCATION_ERROR;
++            return;
+         }
+     }
+     umtx_unlock(&LOCK);
+--- icu/source/common/usprep.cpp.orig	2014-08-27 10:38:24.360821077 +0530
++++ icu/source/common/usprep.cpp	2014-08-27 10:38:38.696821312 +0530
+@@ -796,16 +796,23 @@ usprep_prepare(   const UStringPrepProfi
+     }
+ 
+ CLEANUP:
+-    if(b1!=b1Stack){
+-        uprv_free(b1);
+-        b1=NULL;
+-    }
+-
+-    if(b2!=b1Stack && b2!=b2Stack && b2!=b1 /* b1 should not be freed twice */){
+-        uprv_free(b2);
+-        b2=NULL;
+-    }
+-    return u_terminateUChars(dest, destCapacity, b2Len, status);
++    	if(b2==b1 && b1!=b1Stack){
++		uprv_free(b1);
++		b1=NULL;
++		b2=NULL;
++	}
++	else
++	{
++    		if(b1!=b1Stack){
++        		uprv_free(b1);
++        		b1=NULL;
++    		}
++		if(b2!=b1Stack && b2!=b2Stack && b2!=b1 /* b1 should not be freed twice */){
++        		uprv_free(b2);
++        		b2=NULL;
++		}
++	}
++    	return u_terminateUChars(dest, destCapacity, b2Len, status);
+ }
+ 
+ 


More information about the Libreoffice-commits mailing list