summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-08-05 17:43:29 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2012-08-05 17:43:29 +0000
commit6b96036a80c136b2624da8cae20a5c328aa1909c (patch)
tree147d0c1f77e38f7719c82f296fd00bade7998673 /app-misc/mc
parentkeyword amd64-linux, x86-linux (diff)
downloadgentoo-2-6b96036a80c136b2624da8cae20a5c328aa1909c.tar.gz
gentoo-2-6b96036a80c136b2624da8cae20a5c328aa1909c.tar.bz2
gentoo-2-6b96036a80c136b2624da8cae20a5c328aa1909c.zip
Fixed mcedit segfaults when aspell dictionaries are missing (bug #429794 by Lars Wendler)
(Portage version: 2.2.0_alpha120_p4/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/mc')
-rw-r--r--app-misc/mc/ChangeLog10
-rw-r--r--app-misc/mc/files/mc-4.8.4-Ticket-2856-aspell-sigsegv.patch75
-rw-r--r--app-misc/mc/mc-4.8.4-r3.ebuild (renamed from app-misc/mc/mc-4.8.4-r2.ebuild)5
3 files changed, 87 insertions, 3 deletions
diff --git a/app-misc/mc/ChangeLog b/app-misc/mc/ChangeLog
index 230cdc6b24c4..09164a5e12d4 100644
--- a/app-misc/mc/ChangeLog
+++ b/app-misc/mc/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-misc/mc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/ChangeLog,v 1.263 2012/08/04 15:14:09 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/ChangeLog,v 1.264 2012/08/05 17:43:29 slyfox Exp $
+
+*mc-4.8.4-r3 (05 Aug 2012)
+
+ 05 Aug 2012; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/mc-4.8.4-Ticket-2856-aspell-sigsegv.patch, +mc-4.8.4-r3.ebuild,
+ -mc-4.8.4-r2.ebuild:
+ Fixed mcedit segfaults when aspell dictionaries are missing (bug #429794 by
+ Lars Wendler)
04 Aug 2012; Julian Ospald <hasufell@gentoo.org> mc-4.8.1-r1.ebuild,
mc-4.8.3-r2.ebuild, mc-4.8.4-r2.ebuild, mc-9999.ebuild:
diff --git a/app-misc/mc/files/mc-4.8.4-Ticket-2856-aspell-sigsegv.patch b/app-misc/mc/files/mc-4.8.4-Ticket-2856-aspell-sigsegv.patch
new file mode 100644
index 000000000000..b27088e53775
--- /dev/null
+++ b/app-misc/mc/files/mc-4.8.4-Ticket-2856-aspell-sigsegv.patch
@@ -0,0 +1,75 @@
+Reported-by: Lars Wendler (Polynomial-C)
+Gentoo-bug: https://bugs.gentoo.org/429794
+Upstream bug: https://www.midnight-commander.org/ticket/2856
+
+From 105ac777e17859cad4f3e9cf44663a3f98cfe829 Mon Sep 17 00:00:00 2001
+From: Slava Zanko <slavazanko@gmail.com>
+Date: Wed, 25 Jul 2012 16:30:00 +0300
+Subject: [PATCH] Ticket #2856: Fixed mceditor 4.8.4 segfaults when aspell
+ dictionaries aren't installed
+
+Steps to reproduce:
+ * compile mc with aspell support
+ * remove all aspell's dictionaries
+ * run mc and try to open any file in the internal editor
+ * close the error dialog
+ * try to exit from editor
+
+Expected behaviour: a file panels should be shown
+Actual behaviour: the segfault here.
+
+Signed-off-by: Slava Zanko <slavazanko@gmail.com>
+---
+ src/editor/spell.c | 15 +++++++++------
+ 1 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/src/editor/spell.c b/src/editor/spell.c
+index 73aa9d5..5b4ac6f 100644
+--- a/src/editor/spell.c
++++ b/src/editor/spell.c
+@@ -71,9 +71,7 @@ static struct AspellStringEnumeration *(*mc_aspell_word_list_elements) (const st
+ * ths);
+ static const char *(*mc_aspell_config_retrieve) (struct AspellConfig * ths, const char *key);
+ static void (*mc_delete_aspell_speller) (struct AspellSpeller * ths);
+-/*
+- static void (*mc_delete_aspell_config) (struct AspellConfig * ths);
+- */
++static void (*mc_delete_aspell_config) (struct AspellConfig * ths);
+ static void (*mc_delete_aspell_can_have_error) (struct AspellCanHaveError * ths);
+ static const char *(*mc_aspell_error_message) (const struct AspellCanHaveError * ths);
+ static void (*mc_delete_aspell_string_enumeration) (struct AspellStringEnumeration * ths);
+@@ -228,7 +226,7 @@ spell_available (void)
+ (spell_module, "delete_aspell_speller", (void *) &mc_delete_aspell_speller))
+ goto error_ret;
+
+- if (!g_module_symbol (spell_module, "delete_aspell_config", (void *) &mc_delete_aspell_speller))
++ if (!g_module_symbol (spell_module, "delete_aspell_config", (void *) &mc_delete_aspell_config))
+ goto error_ret;
+
+ if (!g_module_symbol (spell_module, "delete_aspell_string_enumeration",
+@@ -311,7 +309,7 @@ aspell_init (void)
+ {
+ edit_error_dialog (_("Error"), mc_aspell_error_message (error));
+ mc_delete_aspell_can_have_error (error);
+- g_free (global_speller);
++ aspell_clean ();
+ }
+ }
+
+@@ -326,7 +324,12 @@ aspell_clean (void)
+ if (global_speller == NULL)
+ return;
+
+- mc_delete_aspell_speller (global_speller->speller);
++ if (global_speller->speller != NULL)
++ mc_delete_aspell_speller (global_speller->speller);
++
++ if (global_speller->config != NULL)
++ mc_delete_aspell_config (global_speller->config);
++
+ g_free (global_speller);
+ global_speller = NULL;
+
+--
+1.7.8.6
+
diff --git a/app-misc/mc/mc-4.8.4-r2.ebuild b/app-misc/mc/mc-4.8.4-r3.ebuild
index 81c62cec3794..e83bfa1b2088 100644
--- a/app-misc/mc/mc-4.8.4-r2.ebuild
+++ b/app-misc/mc/mc-4.8.4-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/mc-4.8.4-r2.ebuild,v 1.2 2012/08/04 15:14:09 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/mc-4.8.4-r3.ebuild,v 1.1 2012/08/05 17:43:29 slyfox Exp $
EAPI=4
@@ -53,7 +53,8 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-Ticket-2851-fixes-of-ext.d-scripts.patch \
"${FILESDIR}"/${P}-Ticket-2853-fileposition-in-mcedit.patch \
- "${FILESDIR}"/${P}-Ticket-2858-htmlview-segfault.patch
+ "${FILESDIR}"/${P}-Ticket-2858-htmlview-segfault.patch \
+ "${FILESDIR}"/${P}-Ticket-2856-aspell-sigsegv.patch
}
S=${WORKDIR}/${MY_P}