- patches from upstream:

- fix crash in mcedit ran stand-alone (#571570)
- fix segfault when trying to panelize find results (#569823)
This commit is contained in:
Jindrich Novy 2010-03-18 13:30:15 +00:00
parent 1c9de34778
commit 2ed07ce7d8
3 changed files with 54 additions and 21 deletions

View File

@ -1,22 +1,21 @@
diff -up mc-4.7.1/src/find.c.findfix mc-4.7.1/src/find.c
--- mc-4.7.1/src/find.c.findfix 2010-02-26 12:34:03.000000000 +0100
+++ mc-4.7.1/src/find.c 2010-03-02 15:46:55.000000000 +0100
@@ -1004,8 +1004,7 @@ init_find_vars (void)
static char *
make_fullname (const char *dirname, const char *filename)
{
-
- if (strcmp(dirname, ".") == 0 || strcmp(dirname, "."PATH_SEP_STR) == 0)
+ if (dirname == NULL || strcmp(dirname, ".") == 0 || strcmp(dirname, "."PATH_SEP_STR) == 0)
return g_strdup (filename);
if (strncmp(dirname, "."PATH_SEP_STR, 2) == 0)
return concat_dir_and_file (dirname + 2, filename);
@@ -1258,7 +1257,7 @@ find_file (const char *start_dir, const
if ((le->text == NULL) || (entry->data == NULL))
commit 7b9226c5da3a81fb758bee70aafe05bb64d37464
Author: Andrew Borodin <aborodin@vmail.ru>
Date: Sun Feb 28 18:19:52 2010 +0300
Ticket #2068: fixed segfault in panelization of file find result.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
diff --git a/src/find.c b/src/find.c
index dc38e5f..883cb07 100644
--- a/src/find.c
+++ b/src/find.c
@@ -1255,7 +1255,7 @@ find_file (const char *start_dir, const char *pattern, const char *content,
const char *lc_filename = NULL;
WLEntry *le = (WLEntry *) entry->data;
- if ((le->text == NULL) || (entry->data == NULL))
+ if ((le->text == NULL) || (le->data == NULL))
continue;
- if (content_pattern != NULL)
+ if (content_pattern != NULL && strchr (le->text + 4, ':'))
lc_filename = strchr (le->text + 4, ':') + 1;
else
lc_filename = le->text + 4;
if (content_pattern != NULL)

27
mc-mceditcrash.patch Normal file
View File

@ -0,0 +1,27 @@
commit d2a9152cec8db6d21af77bb91490666a85e48d55
Author: Andrew Borodin <aborodin@vmail.ru>
Date: Sat Mar 6 11:08:18 2010 +0300
Ticket #2087: crash in standalone editor and viewer.
Don't try update file manager panels if mc runs as standalone editor or viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
diff --git a/src/execute.c b/src/execute.c
index e8f9ad3..16c0898 100644
--- a/src/execute.c
+++ b/src/execute.c
@@ -304,8 +304,10 @@ toggle_panels (void)
}
#endif /* HAVE_SUBSHELL_SUPPORT */
- update_panels (UP_OPTIMIZE, UP_KEEPSEL);
- update_xterm_title_path ();
+ if ((view_one_file == NULL) && (edit_one_file == NULL)) {
+ update_panels (UP_OPTIMIZE, UP_KEEPSEL);
+ update_xterm_title_path ();
+ }
repaint_screen ();
}

View File

@ -1,7 +1,7 @@
Summary: User-friendly text console file manager and visual shell
Name: mc
Version: 4.7.1
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 1
License: GPLv2
Group: System Environment/Shells
@ -14,6 +14,7 @@ Requires: dev >= 3.3-3
Patch0: mc-extensions.patch
Patch1: mc-findfix.patch
Patch2: mc-mceditcrash.patch
%description
Midnight Commander is a visual shell much like a file manager, only
@ -26,6 +27,7 @@ specific files.
%setup -q
%patch0 -p1 -b .extensions
%patch1 -p1 -b .findfix
%patch2 -p1 -b .mceditcrash
%build
export CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $RPM_OPT_FLAGS"
@ -84,6 +86,11 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_libexecdir}/mc/extfs.d
%changelog
* Thu Mar 18 2010 Jindrich Novy <jnovy@redhat.com> 4.7.1-3
- patches from upstream:
- fix crash in mcedit ran stand-alone (#571570)
- fix segfault when trying to panelize find results (#569823)
* Tue Mar 2 2010 Jindrich Novy <jnovy@redhat.com> 4.7.1-2
- fix segfault when panelizing search results (#569823)