sax/source/fastparser/fastparser.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
New commits: commit 94bdee6bf24965fab957c73a2c38e34c115a030e Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Mar 3 10:20:04 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Mar 3 16:29:15 2022 +0100 crashtesting: assert that !rtl::isAscii in xmlError message probably detected since: commit 089ce740f9f97f9c7b13e37a31acfc94984e9a3e Date: Thu Feb 24 17:45:18 2022 +0300 Deduplicate rtl_*String_newConcat*L or similar Change-Id: I389d0875463f2ac59fda9266b168bdc35c82de95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130917 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 71b316378e01..2a4961737f9e 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -581,14 +581,8 @@ OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemI pMessage = error->message; else pMessage = "unknown error"; - OUStringBuffer aBuffer( 128 ); - aBuffer.append( "[" ); - aBuffer.append( sSystemId ); - aBuffer.append( " line " ); - aBuffer.append( nLine ); - aBuffer.append( "]: " ); - aBuffer.appendAscii( pMessage ); - return aBuffer.makeStringAndClear(); + return OUString::Concat("[") + sSystemId + " line " + OUString::number(nLine) + "]: " + + OUString(pMessage, strlen(pMessage), RTL_TEXTENCODING_ASCII_US); } // throw an exception, but avoid callback if