SECURITY:

fix several vulnerabilites;
http://www.vuxml.org/openbsd/4ccf3184-812c-11d9-b5a5-080020fe8945.html

via/from Gentoo
This commit is contained in:
robert 2005-02-17 21:59:11 +00:00
parent 7f465dc89b
commit 1fa5bce6a9
6 changed files with 88 additions and 6 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.22 2004/12/22 11:48:33 alek Exp $
# $OpenBSD: Makefile,v 1.23 2005/02/17 21:59:11 robert Exp $
COMMENT= "free Norton Commander clone with many useful features"
DISTNAME= mc-4.6.1-pre1
PKGNAME= ${DISTNAME:S,-pre1,pre1,}
PKGNAME= ${DISTNAME:S,-pre1,pre1,}p0
CATEGORIES= misc
HOMEPAGE= http://www.ibiblio.org/mc/

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-edit_editcmd_c,v 1.1 2005/02/17 21:59:11 robert Exp $
--- edit/editcmd.c.orig Thu Feb 17 22:33:12 2005
+++ edit/editcmd.c Thu Feb 17 22:33:30 2005
@@ -247,7 +247,7 @@
g_free (savedir);
fd = mc_mkstemps (&savename, saveprefix, NULL);
g_free (saveprefix);
- if (!savename)
+ if (fd == -1)
return 0;
/* FIXME:
* Close for now because mc_mkstemps use pure open system call

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_utilunix_c,v 1.1 2004/04/11 00:40:59 naddy Exp $
--- src/utilunix.c.orig 2003-11-28 16:23:19.000000000 +0100
+++ src/utilunix.c 2004-04-11 02:36:03.000000000 +0200
@@ -234,9 +234,9 @@ int my_system (int flags, const char *sh
$OpenBSD: patch-src_utilunix_c,v 1.2 2005/02/17 21:59:11 robert Exp $
--- src/utilunix.c.orig Fri Nov 28 16:23:19 2003
+++ src/utilunix.c Thu Feb 17 22:28:40 2005
@@ -234,9 +234,9 @@
signal (SIGCHLD, SIG_DFL);
if (flags & EXECUTE_AS_SHELL)
@ -13,3 +13,12 @@ $OpenBSD: patch-src_utilunix_c,v 1.1 2004/04/11 00:40:59 naddy Exp $
_exit (127); /* Exec error */
} else {
@@ -429,7 +429,7 @@
close (2);
dup (old_error);
close (old_error);
- len = read (error_pipe[0], msg, MAX_PIPE_SIZE);
+ len = read (error_pipe[0], msg, MAX_PIPE_SIZE - 1);
if (len >= 0)
msg[len] = 0;

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-vfs_extfs_c,v 1.1 2005/02/17 21:59:11 robert Exp $
--- vfs/extfs.c.orig Thu Feb 17 22:31:24 2005
+++ vfs/extfs.c Thu Feb 17 22:32:43 2005
@@ -1281,14 +1281,13 @@
g_free (mc_extfsini);
return 0;
}
- if (*key == '#')
+ if (*key == '#' || *key == '\n')
continue;
if ((c = strchr (key, '\n'))){
- *c = 0;
+ *c-- = 0;
+ } else { /* Last line without newline or strlen (key) > 255 */
c = &key [strlen (key) - 1];
- } else {
- c = key;
}
extfs_need_archive [extfs_no] = !(*c == ':');
if (*c == ':')

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-vfs_fish_c,v 1.1 2005/02/17 21:59:11 robert Exp $
--- vfs/fish.c.orig Thu Feb 17 22:26:51 2005
+++ vfs/fish.c Thu Feb 17 22:27:24 2005
@@ -232,7 +232,7 @@
print_vfs_message (_("fish: Waiting for initial line..."));
if (!vfs_s_get_line (me, SUP.sockr, answer, sizeof (answer), ':'))
ERRNOR (E_PROTO, -1);
- print_vfs_message (answer);
+ print_vfs_message ("%s", answer);
if (strstr (answer, "assword")) {
/* Currently, this does not work. ssh reads passwords from

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-vfs_sfs_c,v 1.1 2005/02/17 21:59:11 robert Exp $
--- vfs/sfs.c.orig Thu Feb 17 22:29:12 2005
+++ vfs/sfs.c Thu Feb 17 22:31:11 2005
@@ -343,13 +343,14 @@
}
if (!semi){
+invalid_line:
fprintf (stderr, _("Warning: Invalid line in %s:\n%s\n"),
"sfs.ini", key);
continue;
}
c = semi + 1;
- while ((*c != ' ') && (*c != '\t')) {
+ while (*c && (*c != ' ') && (*c != '\t')) {
switch (*c) {
case '1': flags |= F_1; break;
case '2': flags |= F_2; break;
@@ -360,6 +361,8 @@
}
c++;
}
+ if (!*c)
+ goto invalid_line;
c++;
*(semi+1) = 0;
if ((semi = strchr (c, '\n')))