summaryrefslogtreecommitdiff
path: root/sal/inc/rtl/strbuf.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-23 21:56:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-26 10:18:38 +0100
commit8ec3318688aabdca875e2671e68d5f31205bfe5d (patch)
tree883315e0a16df2452a63b8046557fc09fc10211b /sal/inc/rtl/strbuf.hxx
parentdea0b22a4639a2ef9c75ed6f04d61ca9d99fcb95 (diff)
make sure these are safe wrt embedded NULLs
something of a micro optimization as well I guess
Diffstat (limited to 'sal/inc/rtl/strbuf.hxx')
-rw-r--r--sal/inc/rtl/strbuf.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index 7079ddbed8b5..63ae448478b1 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -298,7 +298,10 @@ public:
Return a OString instance reflecting the current content
of this OStringBuffer.
*/
- const OString toString() const { return OString(pData->buffer); }
+ const OString toString() const
+ {
+ return OString(pData->buffer, pData->length);
+ }
/**
The character at the specified index of this string buffer is set