editeng/source/editeng/impedit3.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2752763389775cf826cd308655f3405b4925c81b
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Apr 17 16:06:25 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Apr 17 20:19:49 2025 +0200

    crashtesting: negative array index on load of tdf100936-4.odt
    
    since:
    
    commit 5a03d511f46ecc05aab35bb29e714b46f5638b1b
    CommitDate: Wed Apr 9 06:47:38 2025 +0200
    
        tdf#130592 i18npool: Fix incorrect line breaking in mixed CJK+Latin
    
    nBreakPos is -1 here, which itself looks dubious, but there is a later
    nBreakPos < nMinBreakPos already.
    
    Change-Id: Ie7f10bee19c359c877e454d20ab1a0efbf5b92c3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184338
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index fac82269ce59..0ea58552c3f6 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2022,7 +2022,7 @@ void ImpEditEngine::ImpBreakLine(ParaPortion& 
rParaPortion, EditLine& rLine, Tex
                 nBreakPos = aLBR.breakIndex;
 
                 // show soft hyphen
-                if ( nBreakPos && CH_SOFTHYPHEN == pNode->GetString()[ 
sal_Int32(nBreakPos) - 1 ] )
+                if ( nBreakPos > 0 && CH_SOFTHYPHEN == 
pNode->GetString()[nBreakPos - 1] )
                     bHyphenated = true;
             }
             else

Reply via email to