summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-12-19 18:47:09 +0100
committerLuboš Luňák <l.lunak@suse.cz>2012-12-19 18:47:09 +0100
commitc3b822e46c04c3b294b1cb1e633ab8e62ad3412b (patch)
tree85ce314abb61db528f913e650e43b8bb8006694f /sal
parentf484a8949334cdb659f3a0c222052fc05a9e76e5 (diff)
don't use shared empty string if extra space is to be allocated
fix crash for fdo#58306 when appending to OUStringBuffer initialised with ""
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/source/strtmpl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/rtl/source/strtmpl.cxx b/sal/rtl/source/strtmpl.cxx
index cdb4f11a0254..505d5aba51fa 100644
--- a/sal/rtl/source/strtmpl.cxx
+++ b/sal/rtl/source/strtmpl.cxx
@@ -1225,7 +1225,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;