[arch-commits] Commit in enchant/repos/extra-x86_64 (5 files)
Jan de Groot
jgc at archlinux.org
Fri Dec 15 22:58:12 UTC 2017
Date: Friday, December 15, 2017 @ 22:58:11
Author: jgc
Revision: 312937
archrelease: copy trunk to extra-x86_64
Added:
enchant/repos/extra-x86_64/0001-voikko-Avoid-crashing-when-there-are-no-languages.patch
(from rev 312936, enchant/trunk/0001-voikko-Avoid-crashing-when-there-are-no-languages.patch)
enchant/repos/extra-x86_64/PKGBUILD
(from rev 312936, enchant/trunk/PKGBUILD)
enchant/repos/extra-x86_64/hspell-fix-nullpointer-dereference.patch
(from rev 312936, enchant/trunk/hspell-fix-nullpointer-dereference.patch)
Deleted:
enchant/repos/extra-x86_64/0001-voikko-Avoid-crashing-when-there-are-no-languages.patch
enchant/repos/extra-x86_64/PKGBUILD
--------------------------------------------------------------+
0001-voikko-Avoid-crashing-when-there-are-no-languages.patch | 92 ++++-----
PKGBUILD | 101 +++++-----
hspell-fix-nullpointer-dereference.patch | 27 ++
3 files changed, 126 insertions(+), 94 deletions(-)
Deleted: 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch
===================================================================
--- 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch 2017-12-15 22:58:06 UTC (rev 312936)
+++ 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch 2017-12-15 22:58:11 UTC (rev 312937)
@@ -1,46 +0,0 @@
-From 5d1257041e6e84b16ee9adc8d1ec6495adc26103 Mon Sep 17 00:00:00 2001
-Message-Id: <5d1257041e6e84b16ee9adc8d1ec6495adc26103.1511516301.git.jan.steffens at gmail.com>
-From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
-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
-
Copied: enchant/repos/extra-x86_64/0001-voikko-Avoid-crashing-when-there-are-no-languages.patch (from rev 312936, enchant/trunk/0001-voikko-Avoid-crashing-when-there-are-no-languages.patch)
===================================================================
--- 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch (rev 0)
+++ 0001-voikko-Avoid-crashing-when-there-are-no-languages.patch 2017-12-15 22:58:11 UTC (rev 312937)
@@ -0,0 +1,46 @@
+From 5d1257041e6e84b16ee9adc8d1ec6495adc26103 Mon Sep 17 00:00:00 2001
+Message-Id: <5d1257041e6e84b16ee9adc8d1ec6495adc26103.1511516301.git.jan.steffens at gmail.com>
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+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
+
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2017-12-15 22:58:06 UTC (rev 312936)
+++ PKGBUILD 2017-12-15 22:58:11 UTC (rev 312937)
@@ -1,48 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at gmail.com>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-# Contributor: dorphell <dorphell at archlinux.org>
-
-pkgname=enchant
-pkgver=2.1.2
-pkgrel=2
-pkgdesc="A wrapper library for generic spell checking"
-arch=('x86_64')
-url="https://abiword.github.io/enchant/"
-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)
-sha256sums=('SKIP'
- 'b30f9ff749a050515a4eb39686b2e3e5e7f2bc84eff26b3611fe3885785166ec')
-
-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
-
- ./bootstrap
-}
-
-build() {
- cd $pkgname
- ./configure --prefix=/usr \
- --disable-static \
- --disable-ispell \
- --with-myspell-dir=/usr/share/myspell
- sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
- make
-}
-
-package() {
- cd $pkgname
- make DESTDIR="${pkgdir}" install
-}
Copied: enchant/repos/extra-x86_64/PKGBUILD (from rev 312936, enchant/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2017-12-15 22:58:11 UTC (rev 312937)
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at gmail.com>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: dorphell <dorphell at archlinux.org>
+
+pkgname=enchant
+pkgver=2.1.2
+pkgrel=3
+pkgdesc="A wrapper library for generic spell checking"
+arch=('x86_64')
+url="https://abiword.github.io/enchant/"
+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)
+sha256sums=('SKIP'
+ 'b30f9ff749a050515a4eb39686b2e3e5e7f2bc84eff26b3611fe3885785166ec'
+ '5bdd03739ce609bf718b158cd90a5f373a7d12db44f70e5bfa6f4becb5ee056e')
+
+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
+
+ ./bootstrap
+}
+
+build() {
+ cd $pkgname
+ ./configure --prefix=/usr \
+ --disable-static \
+ --disable-ispell \
+ --with-myspell-dir=/usr/share/myspell
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
+}
+
+package() {
+ cd $pkgname
+ make DESTDIR="${pkgdir}" install
+}
Copied: enchant/repos/extra-x86_64/hspell-fix-nullpointer-dereference.patch (from rev 312936, enchant/trunk/hspell-fix-nullpointer-dereference.patch)
===================================================================
--- hspell-fix-nullpointer-dereference.patch (rev 0)
+++ hspell-fix-nullpointer-dereference.patch 2017-12-15 22:58:11 UTC (rev 312937)
@@ -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