diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-08-26 12:56:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-08-26 16:01:01 +0200 |
commit | 2d64e7c4de4d675a4d594e90347bead827af8500 (patch) | |
tree | 48dbbd204838b82672e4e3d5634f36329cdc6459 /basic | |
parent | 0e34a52d8db3ea9c9e60af7c7348793dbc5d4d59 (diff) |
Avoid OUString::createFromAscii on input containing NUL characters
...as it triggers the "rtl_uString_newFromLiteral - Found embedded \0 character"
SAL_WARN in rtl::str::newFromLiteral (called from OUString::createFromAscii via
rtl_uString_newFromLiteral)
Change-Id: I6013062b961657561d67d8dbbf5b2a45816eed4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121086
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/symtbl.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index 6fb7f081d853..258989afd394 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -103,7 +103,7 @@ short SbiStringPool::Add(double n, SbxDataType t) } // tdf#143707 - add the content of the buffer to the string pool inclding its calculated length - return Add(OUString::createFromAscii(std::string_view(buf, size))); + return Add(OUString::fromUtf8(std::string_view(buf, size))); } SbiSymPool::SbiSymPool( SbiStringPool& r, SbiSymScope s, SbiParser* pP ) : |