summaryrefslogtreecommitdiff
path: root/user/hunspell/CVE-2019-16707.patch
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2020-02-28 18:34:56 -0600
committerMax Rees <maxcrees@me.com>2020-03-09 21:27:42 -0500
commitce04e9e76552231fd2940d9e02536ebecda3d4a4 (patch)
tree70fc032244ce0362e01d77ff0647cb9e5e5de819 /user/hunspell/CVE-2019-16707.patch
parent757c7417918541af9e656e023b2ead86998a07d9 (diff)
downloadpackages-ce04e9e76552231fd2940d9e02536ebecda3d4a4.tar.gz
packages-ce04e9e76552231fd2940d9e02536ebecda3d4a4.tar.bz2
packages-ce04e9e76552231fd2940d9e02536ebecda3d4a4.tar.xz
packages-ce04e9e76552231fd2940d9e02536ebecda3d4a4.zip
user/hunspell: patch CVE-2019-16707 (#203)
Diffstat (limited to 'user/hunspell/CVE-2019-16707.patch')
-rw-r--r--user/hunspell/CVE-2019-16707.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/user/hunspell/CVE-2019-16707.patch b/user/hunspell/CVE-2019-16707.patch
new file mode 100644
index 000000000..649eef5b2
--- /dev/null
+++ b/user/hunspell/CVE-2019-16707.patch
@@ -0,0 +1,22 @@
+From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Tue, 12 Nov 2019 20:03:15 +0000
+Subject: [PATCH] invalid read memory access #624
+
+---
+ src/hunspell/suggestmgr.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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;