Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Caolán McNamara
ac00d50e50 Resolves: rhbz#1368765 null-deref with input above the BMP 2016-08-29 12:25:30 +01:00
2 changed files with 30 additions and 1 deletions

View file

@ -0,0 +1,24 @@
From e3ee8f770d709ee93062a97be7ff88293a1e5ece Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 6 Apr 2016 11:18:29 +0100
Subject: [PATCH] moz#1256496 we *unset* the utf-8 bit and reset it again later
which seems bizarre to me, but if we do this then csconv may
be null, detect that and skip.
---
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 0403cf4..5a22167 100644
--- a/src/hunspell/suggestmgr.cxx
+++ b/src/hunspell/suggestmgr.cxx
@@ -1853,7 +1853,7 @@
int l1 = strlen(s1);
int l2 = strlen(s2);
if (*(s2+l1-1) == *(s2+l2-1)) return 1;
- } else {
+ } else if (csconv) {
char * olds = s1;
// decapitalise dictionary word
if ((*s1 != *s2) && (*s1 != csconv[((unsigned char)*s2)].clower)) return 0;

View file

@ -3,7 +3,7 @@
Name: hunspell
Summary: A spell checker and morphological analyzer library
Version: 1.3.3
Release: 9%{?dist}
Release: 10%{?dist}
Source: http://downloads.sourceforge.net/%{name}/hunspell-%{version}.tar.gz
Group: System Environment/Libraries
URL: http://hunspell.sourceforge.net/
@ -19,6 +19,7 @@ BuildRequires: words
Requires: hunspell-en-US
Patch1: hunspell.rhbz915448.patch
Patch2: 0001-Resolves-rhbz-1261421-crash-on-mashing-hangul-korean.patch
Patch3: 0001-moz-1256496-we-unset-the-utf-8-bit-and-reset-it-agai.patch
%description
Hunspell is a spell checker and morphological analyzer library and program
@ -38,6 +39,7 @@ Includes and definitions for developing with hunspell
%setup -q
%patch1 -p0 -b .rhbz915448
%patch2 -p1 -b .rhbz1261421
%patch3 -p1 -b .rhbz1368765
%build
configureflags="--disable-rpath --disable-static --with-ui --with-readline"
@ -124,6 +126,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man5/hunspell.5.gz
%changelog
* Mon Aug 29 2016 Caolán McNamara <caolanm@redhat.com> - 1.3.3-10
- Resolves: rhbz#1368765 null-deref with input above the BMP
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild