summaryrefslogtreecommitdiffstats
path: root/source/ap/mc
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/ap/mc
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.xz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/ap/mc')
-rw-r--r--source/ap/mc/changeset_446748619b5cb77ea63360a81bb16cd2dd2caff7.diff87
-rw-r--r--source/ap/mc/changeset_54a5139eec69438f8771ffddcff96a2e72a197ff.diff66
-rw-r--r--source/ap/mc/mc-3605-extfs.c-fix-buffer-overflow.patch53
-rw-r--r--source/ap/mc/mc-3611-fish-fix-perl-ls-helper.patch34
-rw-r--r--source/ap/mc/mc-syntax-error.patch28
-rwxr-xr-xsource/ap/mc/mc.SlackBuild17
6 files changed, 123 insertions, 162 deletions
diff --git a/source/ap/mc/changeset_446748619b5cb77ea63360a81bb16cd2dd2caff7.diff b/source/ap/mc/changeset_446748619b5cb77ea63360a81bb16cd2dd2caff7.diff
deleted file mode 100644
index 080d6276f..000000000
--- a/source/ap/mc/changeset_446748619b5cb77ea63360a81bb16cd2dd2caff7.diff
+++ /dev/null
@@ -1,87 +0,0 @@
-Index: doc/man/mc.1.in
-===================================================================
---- doc/man/mc.1.in (revision 6da546bcf3a09b7710bc3b69d38e736e3273c34b)
-+++ doc/man/mc.1.in (revision 446748619b5cb77ea63360a81bb16cd2dd2caff7)
-@@ -173,9 +173,10 @@
- .PP
- If both paths are specified, the first path name is the directory to show
--in the left panel; the second path name is the directory to be shown in
--the right panel.
-+in the active panel; the second path name is the directory to be shown in
-+the other panel.
- .PP
- If one path is specified, the path name is the directory to show
--in the active panel; current directory is shown in the passive panel.
-+in the active panel; value of "other_dir" from panels.ini is the directory
-+to be shown in the passive panel.
- .PP
- If no paths are specified, current directory is shown in the active panel;
-Index: doc/man/ru/mc.1.in
-===================================================================
---- doc/man/ru/mc.1.in (revision 6da546bcf3a09b7710bc3b69d38e736e3273c34b)
-+++ doc/man/ru/mc.1.in (revision 446748619b5cb77ea63360a81bb16cd2dd2caff7)
-@@ -150,11 +150,12 @@
- .PP
- Если в командной строке указаны два каталога, первый будет отображаться
--в левой панели, второй \- в правой.
-+в активной панели, второй \- в другой панели.
- .PP
- Если указан только один каталог, он будет отображён в активной панели,
--во второй панели будет отображён текущий каталог.
-+во второй панели будет отображён каталог, указанный в параметре "other_dir"
-+в файле panels.ini.
- .PP
- Если каталоги не указаны, в активной панели будет отображён текущий каталог,
--а во второй панели \- каталог, указанный в параметре "other_dir" в файла panels.ini.
-+а во второй панели \- каталог, указанный в параметре "other_dir" в файле panels.ini.
- .\"NODE "Overview"
- .SH "Главное окно программы"
-Index: src/filemanager/midnight.c
-===================================================================
---- src/filemanager/midnight.c (revision b451e8d13ddf89f1b1a00b1c2f240e4deaf8abe7)
-+++ src/filemanager/midnight.c (revision 446748619b5cb77ea63360a81bb16cd2dd2caff7)
-@@ -585,13 +585,13 @@
- * 'mc' (no arguments): mc_run_param0 == NULL, mc_run_param1 == NULL
- * active panel uses current directory
-- * passive panel uses "other_dir" from ini
-+ * passive panel uses "other_dir" from panels.ini
- *
- * 'mc dir1 dir2' (two arguments): mc_run_param0 != NULL, mc_run_param1 != NULL
-- * left panel uses mc_run_param0
-- * right panel uses mc_run_param1
-+ * active panel uses mc_run_param0
-+ * passive panel uses mc_run_param1
- *
- * 'mc dir1' (single argument): mc_run_param0 != NULL, mc_run_param1 == NULL
-- * active panel uses current directory
-- * passive panel uses mc_run_param0
-+ * active panel uses mc_run_param0
-+ * passive panel uses "other_dir" from panels.ini
- */
-
-@@ -620,6 +620,6 @@
- {
- /* one argument */
-- current_dir = NULL; /* assume current dir */
-- other_dir = (char *) mc_run_param0;
-+ current_dir = (char *) mc_run_param0;
-+ other_dir = saved_other_dir; /* from ini */
- }
- }
-@@ -641,12 +641,12 @@
- {
- /* two arguments */
-- current_dir = mc_run_param1;
-- other_dir = (char *) mc_run_param0;
-+ current_dir = (char *) mc_run_param0;
-+ other_dir = mc_run_param1;
- }
- else /* mc_run_param0 != NULL && mc_run_param1 == NULL */
- {
- /* one argument */
-- current_dir = NULL; /* assume current dir */ ;
-- other_dir = (char *) mc_run_param0;
-+ current_dir = (char *) mc_run_param0;
-+ other_dir = saved_other_dir; /* from ini */
- }
- }
diff --git a/source/ap/mc/changeset_54a5139eec69438f8771ffddcff96a2e72a197ff.diff b/source/ap/mc/changeset_54a5139eec69438f8771ffddcff96a2e72a197ff.diff
deleted file mode 100644
index bfb33b5c1..000000000
--- a/source/ap/mc/changeset_54a5139eec69438f8771ffddcff96a2e72a197ff.diff
+++ /dev/null
@@ -1,66 +0,0 @@
-Index: src/filemanager/file.c
-===================================================================
---- src/filemanager/file.c (revision 0fe4734fd6efb169a4057b84a44c223108b957cb)
-+++ src/filemanager/file.c (revision 54a5139eec69438f8771ffddcff96a2e72a197ff)
-@@ -1273,6 +1273,6 @@
- /** Initialize variables for progress bars */
- static FileProgressStatus
--panel_operate_init_totals (FileOperation operation, const WPanel * panel, const char *source,
-- FileOpContext * ctx, filegui_dialog_type_t dialog_type)
-+panel_operate_init_totals (const WPanel * panel, const char *source, FileOpContext * ctx,
-+ filegui_dialog_type_t dialog_type)
- {
- FileProgressStatus status;
-@@ -1283,5 +1283,5 @@
- #endif
-
-- if (operation != OP_MOVE && verbose && file_op_compute_totals)
-+ if (verbose && file_op_compute_totals)
- {
- ComputeDirSizeUI *ui;
-@@ -2379,11 +2379,4 @@
- if (ctx->erase_at_end)
- {
-- /* remove files after move */
-- if (erase_list != NULL)
-- {
-- file_op_context_destroy_ui (ctx);
-- file_op_context_create_ui (ctx, FALSE, FILEGUI_DIALOG_DELETE_ITEM);
-- }
--
- while (erase_list != NULL && return_status != FILE_ABORT)
- {
-@@ -2793,12 +2786,10 @@
- if (operation == OP_DELETE)
- dialog_type = FILEGUI_DIALOG_DELETE_ITEM;
-+ else if (single_entry && S_ISDIR (selection (panel)->st.st_mode))
-+ dialog_type = FILEGUI_DIALOG_MULTI_ITEM;
-+ else if (single_entry || force_single)
-+ dialog_type = FILEGUI_DIALOG_ONE_ITEM;
- else
-- {
-- dialog_type = ((operation != OP_COPY) || single_entry || force_single)
-- ? FILEGUI_DIALOG_ONE_ITEM : FILEGUI_DIALOG_MULTI_ITEM;
--
-- if (single_entry && (operation == OP_COPY) && S_ISDIR (selection (panel)->st.st_mode))
-- dialog_type = FILEGUI_DIALOG_MULTI_ITEM;
-- }
-+ dialog_type = FILEGUI_DIALOG_MULTI_ITEM;
- }
-
-@@ -2845,6 +2836,6 @@
- source_with_vpath = vfs_path_append_new (panel->cwd_vpath, source, (char *) NULL);
- #endif /* WITH_FULL_PATHS */
-- if (panel_operate_init_totals
-- (operation, panel, vfs_path_as_str (source_with_vpath), ctx, dialog_type) == FILE_CONT)
-+ if (panel_operate_init_totals (panel, vfs_path_as_str (source_with_vpath), ctx, dialog_type)
-+ == FILE_CONT)
- {
- if (operation == OP_DELETE)
-@@ -2937,5 +2928,5 @@
- }
-
-- if (panel_operate_init_totals (operation, panel, NULL, ctx, dialog_type) == FILE_CONT)
-+ if (panel_operate_init_totals (panel, NULL, ctx, dialog_type) == FILE_CONT)
- {
- /* Loop for every file, perform the actual copy operation */
diff --git a/source/ap/mc/mc-3605-extfs.c-fix-buffer-overflow.patch b/source/ap/mc/mc-3605-extfs.c-fix-buffer-overflow.patch
new file mode 100644
index 000000000..bf0761f39
--- /dev/null
+++ b/source/ap/mc/mc-3605-extfs.c-fix-buffer-overflow.patch
@@ -0,0 +1,53 @@
+From 5cb89fd2150ac91d791b0360631d3fd08c5fb1d4 Mon Sep 17 00:00:00 2001
+From: Andreas Mohr <and@gmx.li>
+Date: Sat, 12 Mar 2016 16:20:43 +0000
+Subject: [PATCH] extfs.c: fix buffer overflow
+
+When handling with copy/move commands inside of archive we can lead into buffer overflow
+steps to roproduce:
+ create simple 7z archive
+ open it
+ rename single filename
+ hit buffer overflow
+
+found by clang/AddressSanitizer
+
+==17794==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000273593 at pc 0x00000045f2a9 bp 0x7ffc94aa8e20 sp 0x7ffc94aa85d0
+READ of size 2 at 0x602000273593 thread T0
+ #0 0x45f2a8 in __interceptor_strchr.part.44 (/usr/bin/mc+0x45f2a8)
+ #1 0x70fb72 in extfs_find_entry_int /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/extfs/extfs.c:312:13
+ #2 0x70f562 in extfs_find_entry /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/extfs/extfs.c:331:11
+ #3 0x712131 in extfs_internal_stat /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/extfs/extfs.c:1117:13
+ #4 0x7f3de308ab59 in mc_stat /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/interface.c:556:46
+ #5 0x538575 in file_mask_dialog /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/filegui.c:1340:25
+ #6 0x6e0753 in panel_operate /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/file.c:2718:13
+ #7 0x6bdabd in rename_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/cmd.c:811:9
+ #8 0x551ef4 in midnight_execute_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1307:9
+ #9 0x7f3de30a49e7 in buttonbar_callback /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/buttonbar.c:172:42
+ #10 0x7f3de30b2305 in dlg_try_hotkey /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:464:23
+ #11 0x7f3de30b199a in dlg_key_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:509:19
+ #12 0x7f3de30b2ef9 in frontend_dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:570:9
+ #13 0x7f3de30b2af5 in dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1267:5
+ #14 0x5507bb in do_nc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1827:9
+ #15 0x50b874 in main /tmp/portage/app-misc/mc-9999/work/mc-9999/src/main.c:403:21
+ #16 0x7f3de1ec78fb in __libc_start_main (/lib64/libc.so.6+0x208fb)
+ #17 0x427f48 in _start (/usr/bin/mc+0x427f48)
+
+Signed-off-by: Andreas Mohr <and@gmx.li>
+---
+ src/vfs/extfs/extfs.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/vfs/extfs/extfs.c b/src/vfs/extfs/extfs.c
+index 2e7c87b..f7cdaee 100644
+--- a/src/vfs/extfs/extfs.c
++++ b/src/vfs/extfs/extfs.c
+@@ -307,6 +307,8 @@ extfs_find_entry_int (struct entry *dir, const char *name, GSList * list,
+ }
+ }
+ /* Next iteration */
++ if (c == '\0')
++ break;
+ *q = c;
+ p = q + 1;
+ q = strchr (p, PATH_SEP);
diff --git a/source/ap/mc/mc-3611-fish-fix-perl-ls-helper.patch b/source/ap/mc/mc-3611-fish-fix-perl-ls-helper.patch
new file mode 100644
index 000000000..4010bd058
--- /dev/null
+++ b/source/ap/mc/mc-3611-fish-fix-perl-ls-helper.patch
@@ -0,0 +1,34 @@
+From e274e58cb7dff1683480f5538fd1bfa41a85c0c7 Mon Sep 17 00:00:00 2001
+From: Andreas Mohr <and@gmx.li>
+Date: Sun, 13 Mar 2016 20:59:47 +0000
+Subject: [PATCH] Fish: fix perl ls helper
+
+With #3599 I introduce a perl warning in fish_list_perl()
+so fish_list_perl() was skipped (return code 255) and fallback ls
+function was used instead.
+
+Plus all % chars must quoted because of g_strconcat() after reading
+script file into string.
+
+Fix it!
+
+Signed-off-by: Andreas Mohr <and@gmx.li>
+---
+ src/vfs/fish/helpers/ls | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/vfs/fish/helpers/ls b/src/vfs/fish/helpers/ls
+index 1284e17..909a77d 100755
+--- a/src/vfs/fish/helpers/ls
++++ b/src/vfs/fish/helpers/ls
+@@ -138,8 +138,8 @@ while((my $filename = readdir (DIR))){
+ my $linkname = readlink ("$dirname/$filename");
+ $linkname =~ $strutils_shell_escape_regex;
+ printf("R%%o %%o $uid.$gid\nS$size\nd$mloctime\n:\"%%s\" -> \"%%s\"\n\n", S_IMODE($mode), S_IFMT($mode), $e_filename, $linkname);
+- } elseif (S_ISCHR ($mode) || S_ISBLK ($mode)) {
+- my $minor = $rdev % 256;
++ } elsif (S_ISCHR ($mode) || S_ISBLK ($mode)) {
++ my $minor = $rdev %% 256;
+ my $major = int( $rdev / 256 );
+ printf("R%%o %%o $uid.$gid\nE$major,$minor\nd$mloctime\n:\"%%s\"\n\n", S_IMODE($mode), S_IFMT($mode), $e_filename);
+ } else {
diff --git a/source/ap/mc/mc-syntax-error.patch b/source/ap/mc/mc-syntax-error.patch
new file mode 100644
index 000000000..8b7b7d393
--- /dev/null
+++ b/source/ap/mc/mc-syntax-error.patch
@@ -0,0 +1,28 @@
+--- src/vfs/extfs/helpers/patchfs.in
++++ src/vfs/extfs/helpers/patchfs.in
+@@ -80,10 +80,10 @@
+ my ($qfname)=(quotemeta $_[0]);
+
+ $_=`$fileutil $qfname`;
+- } elsif (/^'*lzip/) {
+- return "$lzip -dc $qfname";
+ if (/^'*lz4/) {
+ return "$lz4 -dc $qfname";
++ } elsif (/^'*lzip/) {
++ return "$lzip -dc $qfname";
+ } elsif (/^'*lzma/) {
+ return "$lzma -dc $qfname";
+ } elsif (/^'*xz/) {
+@@ -104,10 +104,10 @@
+ my ($sep) = $append ? '>>' : '>';
+
+ $_=`$fileutil $qfname`;
+- } elsif (/^'*lzip/) {
+- return "$lzip -c $sep $qfname";
+ if (/^'*lz4/) {
+ return "$lz4 -c $sep $qfname";
++ } elsif (/^'*lzip/) {
++ return "$lzip -c $sep $qfname";
+ } elsif (/^'*lzma/) {
+ return "$lzma -c $sep $qfname";
+ } elsif (/^'*xz/) {
diff --git a/source/ap/mc/mc.SlackBuild b/source/ap/mc/mc.SlackBuild
index bb78ba596..b66b432db 100755
--- a/source/ap/mc/mc.SlackBuild
+++ b/source/ap/mc/mc.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@ BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -36,8 +36,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -67,11 +67,10 @@ find . \
# Use geeqie instead of gqview as an external image viewer:
zcat $CWD/mc.image.sh.geeqie.diff.gz | patch -p1 --verbose || exit 1
-# Upstream bugfix for crash moving directories:
-zcat $CWD/changeset_54a5139eec69438f8771ffddcff96a2e72a197ff.diff.gz | patch -p0 --verbose || exit 1
-
-# Upstream fix for cmdline directory handling:
-zcat $CWD/changeset_446748619b5cb77ea63360a81bb16cd2dd2caff7.diff.gz | patch -p0 --verbose || exit 1
+# Upstream fixes:
+zcat $CWD/mc-3605-extfs.c-fix-buffer-overflow.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/mc-3611-fish-fix-perl-ls-helper.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/mc-syntax-error.patch.gz | patch -p0 --verbose || exit 1
if [ ! -x ./configure ]; then
./autogen.sh