diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-20 08:23:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-20 08:34:07 +0100 |
commit | 04ae3d0cc9b671729deabf33c2cea1031d72e6ae (patch) | |
tree | 5b3b8f08aa393c8e659947bd709f3752299686f2 /sal/rtl | |
parent | e7abad5683a28305204977b57357dddefab0e065 (diff) |
len cannot be <= 1 here
Change-Id: I482e6eeca09e7b15a8d95a866ebab35d06f13e9e
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/strbuf.cxx | 2 | ||||
-rw-r--r-- | sal/rtl/ustrbuf.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sal/rtl/strbuf.cxx b/sal/rtl/strbuf.cxx index f7a6c99784af..f8b1f9c6df8c 100644 --- a/sal/rtl/strbuf.cxx +++ b/sal/rtl/strbuf.cxx @@ -117,7 +117,7 @@ void SAL_CALL rtl_stringbuffer_insert( rtl_String ** This, if( len == 1 ) /* optimized for 1 character */ pBuf[offset] = *str; - else if( len > 1 ) + else memcpy( pBuf + offset, str, len * sizeof(sal_Char) ); (*This)->length = nOldLen + len; pBuf[ nOldLen + len ] = 0; diff --git a/sal/rtl/ustrbuf.cxx b/sal/rtl/ustrbuf.cxx index 38c1b0053607..2ebae71dbaf0 100644 --- a/sal/rtl/ustrbuf.cxx +++ b/sal/rtl/ustrbuf.cxx @@ -141,7 +141,7 @@ void SAL_CALL rtl_uStringbuffer_insert( rtl_uString ** This, if( len == 1 ) /* optimized for 1 character */ pBuf[offset] = *str; - else if( len > 1 ) + else memcpy( pBuf + offset, str, len * sizeof(sal_Unicode) ); } (*This)->length = nOldLen + len; |