sal/rtl/source/strtmpl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 371ed6894aa1ea7dd5bff75131fc43b208fbb031
Author: LuboÅ¡ Luňák <[email protected]>
Date:   Wed Dec 19 18:47:09 2012 +0100

    don't use shared empty string if extra space is to be allocated
    
    fix crash for fdo#58306 when appending to OUStringBuffer initialised with ""

diff --git a/sal/rtl/source/strtmpl.cxx b/sal/rtl/source/strtmpl.cxx
index 8001e0a..f9d7a5e 100644
--- a/sal/rtl/source/strtmpl.cxx
+++ b/sal/rtl/source/strtmpl.cxx
@@ -1215,7 +1215,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromLiteral )( 
IMPL_RTL_STRINGDATA** ppThi
                                                      sal_Int32 allocExtra )
     SAL_THROW_EXTERN_C()
 {
-    if ( !nLen )
+    if ( nLen + allocExtra == 0 )
     {
         IMPL_RTL_STRINGNAME( new )( ppThis );
         return;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to