i18npool/source/textconversion/textconversion_zh.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 78aea95703c0111f333b28c690e6b46aae77bf45
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Sep 1 09:09:48 2020 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Sep 1 17:28:36 2020 +0200

    cid#1466573 Dereference after null check
    
    Change-Id: Ie8f5c015d32b67ad9148c1d0bb8d73425a5b563a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101827
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/i18npool/source/textconversion/textconversion_zh.cxx 
b/i18npool/source/textconversion/textconversion_zh.cxx
index 3f7ff96d8a15..d45baa553e53 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -212,7 +212,7 @@ TextConversion_zh::getWordConversion(const OUString& aText, 
sal_Int32 nStartPos,
                 }
             }
 
-            if (!found && index[len+1] - index[len] > 0) {
+            if (wordData && !found && index[len+1] - index[len] > 0) {
                 sal_Int32 bottom = static_cast<sal_Int32>(index[len]);
                 sal_Int32 top = static_cast<sal_Int32>(index[len+1]) - 1;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to