!10 fix CVE-2019-16707
From: @jinzhimin369 Reviewed-by: @orange-snn Signed-off-by: @orange-snn
This commit is contained in:
commit
57dc556c8d
22
backport-CVE-2019-16707.patch
Normal file
22
backport-CVE-2019-16707.patch
Normal file
@ -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;
|
||||||
@ -1,9 +1,12 @@
|
|||||||
Name: hunspell
|
Name: hunspell
|
||||||
Summary: A spell checker and morphological analyzer library
|
Summary: A spell checker and morphological analyzer library
|
||||||
Version: 1.7.0
|
Version: 1.7.0
|
||||||
Release: 6
|
Release: 7
|
||||||
URL: https://github.com/hunspell/hunspell
|
URL: https://github.com/hunspell/hunspell
|
||||||
Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz
|
Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch1: backport-CVE-2019-16707.patch
|
||||||
|
|
||||||
License: LGPLv2+ or GPLv2+ or MPLv1.1
|
License: LGPLv2+ or GPLv2+ or MPLv1.1
|
||||||
BuildRequires: gcc-c++ autoconf automake libtool ncurses-devel gettext
|
BuildRequires: gcc-c++ autoconf automake libtool ncurses-devel gettext
|
||||||
BuildRequires: perl-generators words hunspell hunspell-devel gdb
|
BuildRequires: perl-generators words hunspell hunspell-devel gdb
|
||||||
@ -83,6 +86,9 @@ cp -a %{_libdir}/libhunspell-1.6.so* %{buildroot}%{_libdir}
|
|||||||
%lang(hu) %{_mandir}/hu/man1/hunspell.1.gz
|
%lang(hu) %{_mandir}/hu/man1/hunspell.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 13 2021 jinzhimin <jinzhimin2@huawei.com> - 1.7.0-7
|
||||||
|
- fix CVE-2019-16707
|
||||||
|
|
||||||
* Tue Sep 08 2020 zhanzhimin <zhanzhimin@huawei.com> - 1.7.0-6
|
* Tue Sep 08 2020 zhanzhimin <zhanzhimin@huawei.com> - 1.7.0-6
|
||||||
- update source
|
- update source
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user