From 0047e38da8bdfe09360cc2a658283ad5e18986e7 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 16 Nov 2021 14:31:58 +0100 Subject: svtools: HTMLParser: don't insert EOF into strings It's not a valid Unicode code point. Change-Id: I96103f4c505047bdf0451619937b8e1b2efb127f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125307 Tested-by: Jenkins Reviewed-by: Michael Stahl --- svtools/source/svhtml/parhtml.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'svtools') diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index e38afaa8ec2b..e96af0e732a7 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -651,11 +651,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak ) { bContinue = false; } - else - { - sTmpBuffer.appendUtf32( nNextCh ); - } - + // else: ignore, not a valid code point break; case '<': @@ -967,7 +963,7 @@ HtmlTokenId HTMLParser::GetNextRawToken() } break; } - [[fallthrough]]; + break; default: if (!linguistic::IsControlChar(nNextCh) || nNextCh == '\t') { -- cgit v1.2.3