diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-12-18 17:43:56 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-12-18 17:44:54 +0000 |
commit | 09123760860f99756d37b70557d83f707fda6b17 (patch) | |
tree | bed00d794113197709936cc9e07d4049d36c17e7 /sal/rtl | |
parent | sw: update README of qa/extras (diff) | |
download | core-09123760860f99756d37b70557d83f707fda6b17.tar.gz core-09123760860f99756d37b70557d83f707fda6b17.zip |
fdo#58473 - fix transliteration crasher caused by writing const string.
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/source/strtmpl.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/rtl/source/strtmpl.cxx b/sal/rtl/source/strtmpl.cxx index f715a581e2ce..cdb4f11a0254 100644 --- a/sal/rtl/source/strtmpl.cxx +++ b/sal/rtl/source/strtmpl.cxx @@ -1069,8 +1069,8 @@ void SAL_CALL IMPL_RTL_STRINGNAME( new )( IMPL_RTL_STRINGDATA** ppThis ) IMPL_RTL_STRINGDATA* SAL_CALL IMPL_RTL_STRINGNAME( alloc )( sal_Int32 nLen ) SAL_THROW_EXTERN_C() { - if ( nLen <= 0 ) - return (IMPL_RTL_STRINGDATA*) (&IMPL_RTL_EMPTYSTRING); + if ( nLen < 0 ) + return NULL; else return IMPL_RTL_STRINGNAME( ImplAlloc )( nLen ); } |