- fix segfault when panelizing search results (#569823)

This commit is contained in:
Jindrich Novy 2010-03-02 14:54:48 +00:00
parent d7afc6f9d9
commit 1c9de34778
2 changed files with 28 additions and 1 deletions

22
mc-findfix.patch Normal file
View File

@ -0,0 +1,22 @@
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))
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;

View File

@ -1,7 +1,7 @@
Summary: User-friendly text console file manager and visual shell
Name: mc
Version: 4.7.1
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 1
License: GPLv2
Group: System Environment/Shells
@ -13,6 +13,7 @@ BuildRequires: glib2-devel e2fsprogs-devel slang-devel gpm-devel
Requires: dev >= 3.3-3
Patch0: mc-extensions.patch
Patch1: mc-findfix.patch
%description
Midnight Commander is a visual shell much like a file manager, only
@ -24,6 +25,7 @@ specific files.
%prep
%setup -q
%patch0 -p1 -b .extensions
%patch1 -p1 -b .findfix
%build
export CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $RPM_OPT_FLAGS"
@ -82,6 +84,9 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_libexecdir}/mc/extfs.d
%changelog
* Tue Mar 2 2010 Jindrich Novy <jnovy@redhat.com> 4.7.1-2
- fix segfault when panelizing search results (#569823)
* Mon Mar 1 2010 Jindrich Novy <jnovy@redhat.com> 4.7.1-1
- update to 4.7.1