Date: Monday, January 15, 2018 @ 17:12:09 Author: felixonmars Revision: 314806
upgpkg: enchant 2.2.1-1 Modified: enchant/trunk/PKGBUILD Deleted: enchant/trunk/0001-voikko-Avoid-crashing-when-there-are-no-languages.patch enchant/trunk/hspell-fix-nullpointer-dereference.patch --------------------------------------------------------------+ 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch | 46 ---------- PKGBUILD | 31 +----- hspell-fix-nullpointer-dereference.patch | 27 ----- 3 files changed, 7 insertions(+), 97 deletions(-) Deleted: 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch =================================================================== --- 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch 2018-01-15 17:02:59 UTC (rev 314805) +++ 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch 2018-01-15 17:12:09 UTC (rev 314806) @@ -1,46 +0,0 @@ -From 5d1257041e6e84b16ee9adc8d1ec6495adc26103 Mon Sep 17 00:00:00 2001 -Message-Id: <5d1257041e6e84b16ee9adc8d1ec6495adc26103.1511516301.git.jan.steff...@gmail.com> -From: "Jan Alexander Steffens (heftig)" <[email protected]> -Date: Fri, 24 Nov 2017 10:34:01 +0100 -Subject: [PATCH] voikko: Avoid crashing when there are no languages - -voikko_provider_list_dicts returned NULL in this case. Fix this and use -voikkoListSupportedSpellingLanguages directly, which always returns a -valid pointer and also avoids copying. ---- - providers/enchant_voikko.c | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/providers/enchant_voikko.c b/providers/enchant_voikko.c -index 7af9db4c18580872..d6df8baa9a49c859 100644 ---- a/providers/enchant_voikko.c -+++ b/providers/enchant_voikko.c -@@ -111,16 +111,19 @@ static int - voikko_provider_dictionary_exists (struct str_enchant_provider * me _GL_UNUSED_PARAMETER, - const char *const tag) - { -- size_t i, n_dicts; -- char ** existing_dicts = voikko_provider_list_dicts (NULL, &n_dicts); -+ size_t i; -+ int exists = 0; -+ char ** voikko_langs = voikkoListSupportedSpellingLanguages (NULL); - -- for (i = 0; existing_dicts[i] != NULL; i++) { -- if (strncmp (tag, existing_dicts[i], strlen (tag)) == 0) { -- return 1; -+ for (i = 0; voikko_langs[i] != NULL; i++) { -+ if (strncmp (tag, voikko_langs[i], strlen (tag)) == 0) { -+ exists = 1; -+ break; - } - } -+ voikkoFreeCstrArray(voikko_langs); - -- return 0; -+ return exists; - } - - static EnchantDict * --- -2.15.0 - Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-01-15 17:02:59 UTC (rev 314805) +++ PKGBUILD 2018-01-15 17:12:09 UTC (rev 314806) @@ -4,7 +4,7 @@ # Contributor: dorphell <[email protected]> pkgname=enchant -pkgver=2.1.3 +pkgver=2.2.1 pkgrel=1 pkgdesc="A wrapper library for generic spell checking" arch=('x86_64') @@ -12,33 +12,16 @@ license=('LGPL') depends=('aspell' 'hunspell' 'hspell' 'libvoikko' 'glib2') 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 - hspell-fix-nullpointer-dereference.patch) -sha512sums=('SKIP' - '06dcafd55a6ce6d47227465d0e08863e06e8f638c74af359312e94ccf89a01885d6e8cb3820f06923d622d7ea4a239029698b44deb1dd588f0d0f902d8289a8e' - 'e4f59189f8f236954208426eedd2dd3f42f36d96fb96b5a4f952da74cdf0d8472e8bbd5cb010ccdbc8ce516fc778ebf130b21cf53820404fe31451bdfeb542c5') +source=("$pkgname-$pkgver.tar.gz::https://github.com/AbiWord/enchant/archive/v$pkgver.tar.gz") +sha512sums=('f5fc611cabada32cd57e9638e0e0dd0f5c8198cf82dc122185d1a426793f9f0c85fc4a2e5c512720787238864d7a83320fcdaa10db268d42f6ea18fb3540ba48') -pkgver() { - cd $pkgname - git describe --tags | sed 's/^v//;s/-/\./g' -} - prepare() { - cd $pkgname - - # 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 - + cd $pkgname-$pkgver ./bootstrap } build() { - cd $pkgname + cd $pkgname-$pkgver ./configure --prefix=/usr \ --disable-static \ --disable-ispell \ @@ -48,6 +31,6 @@ } package() { - cd $pkgname - make DESTDIR="${pkgdir}" install + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install } Deleted: hspell-fix-nullpointer-dereference.patch =================================================================== --- hspell-fix-nullpointer-dereference.patch 2018-01-15 17:02:59 UTC (rev 314805) +++ hspell-fix-nullpointer-dereference.patch 2018-01-15 17:12:09 UTC (rev 314806) @@ -1,27 +0,0 @@ -From 62dd1f24ef08e2f3e4bc9b15d9a48acc7c88d650 Mon Sep 17 00:00:00 2001 -From: Reuben Thomas <[email protected]> -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);
