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/inc | |
parent | 058702256211804a449ae7e16b4fc4bd16236f40 (diff) |
fdo#58473 - fix transliteration crasher caused by writing const string.
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/rtl/string.h | 2 | ||||
-rw-r--r-- | sal/inc/rtl/ustring.h | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sal/inc/rtl/string.h b/sal/inc/rtl/string.h index bfeecf781e62..26fa5c728666 100644 --- a/sal/inc/rtl/string.h +++ b/sal/inc/rtl/string.h @@ -821,6 +821,8 @@ SAL_DLLPUBLIC void SAL_CALL rtl_string_new( rtl_String ** newStr ) SAL_THROW_EXT The reference count of the new string will be 1. The length of the string will be nLen. This function does not handle out-of-memory conditions. + For nLen < 0 or failed allocation this method returns NULL. + The characters of the capacity are not cleared, and the length is set to nLen, unlike the similar method of rtl_String_new_WithLength which zeros out the buffer, and sets the length to 0. So should be somewhat diff --git a/sal/inc/rtl/ustring.h b/sal/inc/rtl/ustring.h index fe2f2f47607d..1ff75bdeb319 100644 --- a/sal/inc/rtl/ustring.h +++ b/sal/inc/rtl/ustring.h @@ -1152,8 +1152,9 @@ SAL_DLLPUBLIC void SAL_CALL rtl_uString_new( /** Allocate a new string containing space for a given number of characters. The reference count of the new string will be 1. The length of the string - will be nLen. This function throws std::bad_alloc on out-of-memory - conditions. + will be nLen. This function does not handle out-of-memory conditions. + + For nLen < 0 or failed allocation this method returns NULL. The characters of the capacity are not cleared, and the length is set to nLen, unlike the similar method of rtl_uString_new_WithLength which |