1 From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Tue, 12 Nov 2019 20:03:15 +0000
4 Subject: [PATCH] invalid read memory access #624
7 src/hunspell/suggestmgr.cxx | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
10 diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx
11 index dba084e..c23f165 100644
12 --- a/src/hunspell/suggestmgr.cxx
13 +++ b/src/hunspell/suggestmgr.cxx
14 @@ -2040,7 +2040,7 @@ int SuggestMgr::leftcommonsubstring(
16 // decapitalize dictionary word
17 if (complexprefixes) {
18 - if (su1[l1 - 1] == su2[l2 - 1])
19 + if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1])
22 unsigned short idx = su2.empty() ? 0 : (su2[0].h << 8) + su2[0].l;