From: Marcin Krol Date: Fri, 1 Apr 2016 10:44:42 +0000 (+0000) Subject: - updated to 4.8.16 X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=37639d4c8dfc8ab328a765ae9190d1065b4a8b5f;p=packages%2Fmc.git - updated to 4.8.16 --- diff --git a/mc-search-segv.patch b/mc-search-segv.patch deleted file mode 100644 index 8d20ab9..0000000 --- a/mc-search-segv.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/lib/search/regex.c b/lib/search/regex.c -index f6eb24e..53e3b6f 100644 ---- a/lib/search/regex.c -+++ b/lib/search/regex.c -@@ -249,6 +249,60 @@ mc_search__cond_struct_new_regex_ci_str (const char *charset, const GString * as - - /* --------------------------------------------------------------------------------------------- */ - -+#ifdef SEARCH_TYPE_GLIB -+/* Glib doesn't like invalid UTF-8 so sanitize it first: ticket 3449. -+ * Be careful: there might be embedded NULs in the strings. */ -+static gboolean -+mc_search__g_regex_match_full_safe (const GRegex * regex, -+ const gchar * string, -+ gssize string_len, -+ gint start_position, -+ GRegexMatchFlags match_options, -+ GMatchInfo ** match_info, GError ** error) -+{ -+ char *string_safe, *p, *end; -+ gboolean ret; -+ -+ if ((g_regex_get_compile_flags (regex) & G_REGEX_RAW) -+ || g_utf8_validate (string, string_len, NULL)) -+ { -+ return g_regex_match_full (regex, string, string_len, start_position, match_options, -+ match_info, error); -+ } -+ -+ if (string_len < 0) -+ { -+ string_len = strlen (string); -+ } -+ p = string_safe = g_strndup (string, string_len); -+ end = p + string_len; -+ -+ while (p < end) -+ { -+ gunichar c = g_utf8_get_char_validated (p, -1); -+ if (c != (gunichar) (-1) && c != (gunichar) (-2)) -+ { -+ p = g_utf8_next_char (p); -+ } -+ else -+ { -+ /* U+FFFD would be the proper choice, but then we'd have to -+ maintain mapping between old and new offsets. -+ So rather do a byte by byte replacement. */ -+ *p++ = '\0'; -+ } -+ } -+ -+ ret = -+ g_regex_match_full (regex, string_safe, string_len, start_position, match_options, -+ match_info, error); -+ g_free (string_safe); -+ return ret; -+} -+#endif /* SEARCH_TYPE_GLIB */ -+ -+/* --------------------------------------------------------------------------------------------- */ -+ - static mc_search__found_cond_t - mc_search__regex_found_cond_one (mc_search_t * lc_mc_search, mc_search_regex_t * regex, - GString * search_str) -@@ -256,8 +310,9 @@ mc_search__regex_found_cond_one (mc_search_t * lc_mc_search, mc_search_regex_t * - #ifdef SEARCH_TYPE_GLIB - GError *mcerror = NULL; - -- if (!g_regex_match_full (regex, search_str->str, search_str->len, 0, G_REGEX_MATCH_NEWLINE_ANY, -- &lc_mc_search->regex_match_info, &mcerror)) -+ if (!mc_search__g_regex_match_full_safe -+ (regex, search_str->str, search_str->len, 0, G_REGEX_MATCH_NEWLINE_ANY, -+ &lc_mc_search->regex_match_info, &mcerror)) - { - g_match_info_free (lc_mc_search->regex_match_info); - lc_mc_search->regex_match_info = NULL; diff --git a/mc.spec b/mc.spec index 4e65dfd..4d5ee72 100644 --- a/mc.spec +++ b/mc.spec @@ -18,13 +18,13 @@ Summary(tr.UTF-8): Midnight Commander görsel kabuğu Summary(uk.UTF-8): Диспетчер файлів Midnight Commander Summary(zh_CN.UTF-8): 一个方便实用的文件管理器和虚拟Shell Name: mc -Version: 4.8.14 -Release: 2 +Version: 4.8.16 +Release: 1 Epoch: 1 License: GPL v3+ Group: Applications/Shells Source0: http://ftp.midnight-commander.org/%{name}-%{version}.tar.xz -# Source0-md5: fbdaddb9edcf8925dcf3231331a8720b +# Source0-md5: 5df626a64592ccc5891afd3923edcdbf Source3: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2 # Source3-md5: 17d7b574e1b85ad6f8ddceda9e841f19 Source7: %{name}.desktop @@ -36,8 +36,6 @@ Patch4: %{name}-confirm-exit.patch Patch5: %{name}-noperl-vfs.patch # at now syntax highligthing for PLD-update-TODO and CVSROOT/users Patch6: %{name}-pld-developerfriendly.patch -# https://www.midnight-commander.org/ticket/3449 -Patch7: %{name}-search-segv.patch URL: http://www.midnight-commander.org/ BuildRequires: autoconf >= 2.60 BuildRequires: automake >= 1.5 @@ -167,7 +165,6 @@ tar, zip ve RPM dosyalarının içeriklerini gösterebilmesidir. %patch4 -p1 %{!?with_perl_vfs:%patch5 -p1} %patch6 -p1 -%patch7 -p1 %{__rm} po/stamp-po @@ -226,11 +223,6 @@ install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT/etc/shrc.d # enhanced version %{__mv} $RPM_BUILD_ROOT%{_datadir}/mc/hints/mc.hint.{zh,zh_CN} -# outdated version of fi -%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/fi_FI -# empty version of sv -%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sv_SE - %find_lang %{name} %clean