comphelper/source/misc/syntaxhighlight.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7cc3d290779796b54f5b6fb1a4a32066f177d323
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Apr 29 12:29:25 2022 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri Apr 29 16:45:45 2022 +0200

    Check iterator before dereference
    
    ... since commit b1148c31ed2786396f0b018a988fce8288f1797d
      Author Noel Grandin <noel.gran...@collabora.co.uk>
      Date   Wed Apr 27 16:47:53 2022 +0200
        use more string_view in comphelper
    
    Change-Id: I182bc507b5693048350d6e54bb7b6176389e2241
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133596
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/comphelper/source/misc/syntaxhighlight.cxx 
b/comphelper/source/misc/syntaxhighlight.cxx
index 304e9e6b271f..de25fd158965 100644
--- a/comphelper/source/misc/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -487,7 +487,7 @@ bool 
SyntaxHighlighter::Tokenizer::getNextToken(std::u16string_view::const_itera
     }
 
     // Object separator? Must be handled before Number
-    else if( c == '.' && ( *pos < '0' || *pos > '9' ) )
+    else if( c == '.' && ( pos == end || *pos < '0' || *pos > '9' ) )
     {
         reType = TokenType::Operator;
     }

Reply via email to