svtools/source/svhtml/parhtml.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 0047e38da8bdfe09360cc2a658283ad5e18986e7
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Nov 16 14:31:58 2021 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Nov 16 17:50:07 2021 +0100

    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 <michael.st...@allotropia.de>

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')
             {

Reply via email to