basic/source/comp/symtbl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 2d64e7c4de4d675a4d594e90347bead827af8500 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Aug 26 12:56:04 2021 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Aug 26 16:01:01 2021 +0200 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 <sberg...@redhat.com> 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 ) :