Petr Gajdos
0562ed34da
- added patches fix CVE-2019-16707 [bsc#1151867], invalid read operation in SuggestMgr:leftcommonsubstring in suggestmgr.cxx + hunspell-CVE-2019-16707.patch OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/hunspell?expand=0&rev=64
15 lines
503 B
Diff
15 lines
503 B
Diff
diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx
|
|
index dba084e9..c23f165a 100644
|
|
--- a/src/hunspell/suggestmgr.cxx
|
|
+++ b/src/hunspell/suggestmgr.cxx
|
|
@@ -2040,7 +2040,7 @@ int SuggestMgr::leftcommonsubstring(
|
|
int l2 = su2.size();
|
|
// decapitalize dictionary word
|
|
if (complexprefixes) {
|
|
- if (su1[l1 - 1] == su2[l2 - 1])
|
|
+ if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1])
|
|
return 1;
|
|
} else {
|
|
unsigned short idx = su2.empty() ? 0 : (su2[0].h << 8) + su2[0].l;
|
|
|