[Libreoffice-commits] .: Branch 'libreoffice-4-0' - sal/rtl
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Dec 19 09:51:07 PST 2012
sal/rtl/source/strtmpl.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 371ed6894aa1ea7dd5bff75131fc43b208fbb031
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
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;
More information about the Libreoffice-commits
mailing list