[arch-commits] Commit in enchant/trunk (2 files)
Jan de Groot
jgc at archlinux.org
Fri Dec 15 22:58:07 UTC 2017
Date: Friday, December 15, 2017 @ 22:58:06
Author: jgc
Revision: 312936
upgpkg: enchant 2.1.2-3
Fix crash with hspell plugin
Added:
enchant/trunk/hspell-fix-nullpointer-dereference.patch
Modified:
enchant/trunk/PKGBUILD
------------------------------------------+
PKGBUILD | 11 ++++++++---
hspell-fix-nullpointer-dereference.patch | 27 +++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-12-15 22:09:25 UTC (rev 312935)
+++ PKGBUILD 2017-12-15 22:58:06 UTC (rev 312936)
@@ -5,7 +5,7 @@
pkgname=enchant
pkgver=2.1.2
-pkgrel=2
+pkgrel=3
pkgdesc="A wrapper library for generic spell checking"
arch=('x86_64')
url="https://abiword.github.io/enchant/"
@@ -14,9 +14,11 @@
makedepends=('git')
_commit=9889e6350eb645feca2b0c061f719ca4188984d5 # tags/v2.1.2
source=("git+https://github.com/AbiWord/enchant.git#commit=$_commit"
- 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch)
+ 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch
+ hspell-fix-nullpointer-dereference.patch)
sha256sums=('SKIP'
- 'b30f9ff749a050515a4eb39686b2e3e5e7f2bc84eff26b3611fe3885785166ec')
+ 'b30f9ff749a050515a4eb39686b2e3e5e7f2bc84eff26b3611fe3885785166ec'
+ '5bdd03739ce609bf718b158cd90a5f373a7d12db44f70e5bfa6f4becb5ee056e')
pkgver() {
cd $pkgname
@@ -29,6 +31,9 @@
# https://github.com/AbiWord/enchant/pull/161
patch -Np1 -i ../0001-voikko-Avoid-crashing-when-there-are-no-languages.patch
+ # https://github.com/AbiWord/enchant/issues/170
+ patch -Np1 -i ../hspell-fix-nullpointer-dereference.patch
+
./bootstrap
}
Added: hspell-fix-nullpointer-dereference.patch
===================================================================
--- hspell-fix-nullpointer-dereference.patch (rev 0)
+++ hspell-fix-nullpointer-dereference.patch 2017-12-15 22:58:06 UTC (rev 312936)
@@ -0,0 +1,27 @@
+From 62dd1f24ef08e2f3e4bc9b15d9a48acc7c88d650 Mon Sep 17 00:00:00 2001
+From: Reuben Thomas <rrt at sc3d.org>
+Date: Fri, 8 Dec 2017 15:34:21 +0000
+Subject: [PATCH] Fix #170: potential null pointer dereference
+
+---
+ providers/enchant_hspell.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/providers/enchant_hspell.c b/providers/enchant_hspell.c
+index c7028f1..0e5bbac 100644
+--- a/providers/enchant_hspell.c
++++ b/providers/enchant_hspell.c
+@@ -102,6 +102,13 @@ hspell_dict_suggest (EnchantDict * me, const char *const word,
+ gsize length;
+ char *iso_word = g_convert (word, len, "iso8859-8", "utf-8", NULL, &length, NULL);
+
++ /* check we got a result */
++ if (iso_word == NULL)
++ {
++ g_free (iso_word);
++ return NULL;
++ }
++
+ /* get suggestions */
+ struct corlist cl;
+ corlist_init (&cl);
More information about the arch-commits
mailing list