diff options
author | Michael Januszewski <spock@gentoo.org> | 2007-12-28 11:57:35 +0000 |
---|---|---|
committer | Michael Januszewski <spock@gentoo.org> | 2007-12-28 11:57:35 +0000 |
commit | dd88e22587079eca097f1c0270d1594319368de9 (patch) | |
tree | d4f58b0ba1adf7584c3876aeb8c2193caabfa181 /x11-misc/xfractint | |
parent | Added hppa to KEYWORDS. (diff) | |
download | gentoo-2-dd88e22587079eca097f1c0270d1594319368de9.tar.gz gentoo-2-dd88e22587079eca097f1c0270d1594319368de9.tar.bz2 gentoo-2-dd88e22587079eca097f1c0270d1594319368de9.zip |
Add a fix for bug #203548 by Andrew Church <gentoo@achurch.org>.
(Portage version: 2.1.4_rc11)
Diffstat (limited to 'x11-misc/xfractint')
-rw-r--r-- | x11-misc/xfractint/ChangeLog | 7 | ||||
-rw-r--r-- | x11-misc/xfractint/files/xfractint-20.04p07-filename-buffer-overflow-fix.patch | 117 | ||||
-rw-r--r-- | x11-misc/xfractint/xfractint-20.04_p07.ebuild | 3 |
3 files changed, 125 insertions, 2 deletions
diff --git a/x11-misc/xfractint/ChangeLog b/x11-misc/xfractint/ChangeLog index a845b167c726..63062310afa2 100644 --- a/x11-misc/xfractint/ChangeLog +++ b/x11-misc/xfractint/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for x11-misc/xfractint # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/xfractint/ChangeLog,v 1.46 2007/12/27 20:47:01 drac Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/xfractint/ChangeLog,v 1.47 2007/12/28 11:57:35 spock Exp $ + + 28 Dec 2007; Michał Januszewski <spock@gentoo.org> + +files/xfractint-20.04p07-filename-buffer-overflow-fix.patch, + xfractint-20.04_p07.ebuild: + Add a fix for bug #203548 by Andrew Church <gentoo@achurch.org>. 27 Dec 2007; Samuli Suominen <drac@gentoo.org> xfractint-20.04_p07.ebuild: amd64 stable diff --git a/x11-misc/xfractint/files/xfractint-20.04p07-filename-buffer-overflow-fix.patch b/x11-misc/xfractint/files/xfractint-20.04p07-filename-buffer-overflow-fix.patch new file mode 100644 index 000000000000..7f9a2ecbc503 --- /dev/null +++ b/x11-misc/xfractint/files/xfractint-20.04p07-filename-buffer-overflow-fix.patch @@ -0,0 +1,117 @@ +diff -urN ../xfractint-20.04p07-orig/dos_help/hc.c ../xfractint-20.04p07/dos_help/hc.c +--- ../xfractint-20.04p07-orig/dos_help/hc.c 2006-03-15 10:30:47 +0900 ++++ ../xfractint-20.04p07/dos_help/hc.c 2007-12-28 16:05:53 +0900 +@@ -72,8 +72,8 @@ + # include <dir.h> + # define FNSPLIT fnsplit + #else +-# define MAXFILE _MAX_FNAME +-# define MAXEXT _MAX_EXT ++# define MAXFILE FILE_MAX_FNAME ++# define MAXEXT FILE_MAX_EXT + # define FNSPLIT _splitpath + #endif + +diff -urN ../xfractint-20.04p07-orig/headers/fractint.h ../xfractint-20.04p07/headers/fractint.h +--- ../xfractint-20.04p07-orig/headers/fractint.h 2006-11-26 04:43:07 +0900 ++++ ../xfractint-20.04p07/headers/fractint.h 2007-12-28 16:07:02 +0900 +@@ -47,31 +47,6 @@ + #define RESTORESTART 3 + #define CONTINUE 4 + +-/* these are used to declare arrays for file names */ +-#ifdef XFRACT +-#define FILE_MAX_PATH 256 /* max length of path+filename */ +-#define FILE_MAX_DIR 256 /* max length of directory name */ +-#else +-#define FILE_MAX_PATH 80 /* max length of path+filename */ +-#define FILE_MAX_DIR 80 /* max length of directory name */ +-#endif +-#define FILE_MAX_DRIVE 3 /* max length of drive letter */ +- +-#if 1 +-#define FILE_MAX_FNAME 9 /* max length of filename */ +-#define FILE_MAX_EXT 5 /* max length of extension */ +-#else +-/* +-The filename limits were increased in Xfract 3.02. But alas, +-in this poor program that was originally developed on the +-nearly-brain-dead DOS operating system, quite a few things +-in the UI would break if file names were bigger than DOS 8-3 +-names. So for now humor us and let's keep the names short. +-*/ +-#define FILE_MAX_FNAME 64 /* max length of filename */ +-#define FILE_MAX_EXT 64 /* max length of extension */ +-#endif +- + #define MAXMAXLINELENGTH 128 /* upper limit for maxlinelength for PARs */ + #define MINMAXLINELENGTH 40 /* lower limit for maxlinelength for PARs */ + +diff -urN ../xfractint-20.04p07-orig/headers/port.h ../xfractint-20.04p07/headers/port.h +--- ../xfractint-20.04p07-orig/headers/port.h 2006-11-26 04:43:07 +0900 ++++ ../xfractint-20.04p07/headers/port.h 2007-12-28 16:11:15 +0900 +@@ -260,6 +260,36 @@ + #endif + #endif + ++ ++/* The following FILE_* #defines were moved here from fractint.h to ++ * avoid inconsistent declarations in dos_help/hc.c and unix/unix.c. */ ++ ++/* these are used to declare arrays for file names */ ++#ifdef XFRACT ++#define FILE_MAX_PATH 256 /* max length of path+filename */ ++#define FILE_MAX_DIR 256 /* max length of directory name */ ++#else ++#define FILE_MAX_PATH 80 /* max length of path+filename */ ++#define FILE_MAX_DIR 80 /* max length of directory name */ ++#endif ++#define FILE_MAX_DRIVE 3 /* max length of drive letter */ ++ ++#if 1 ++#define FILE_MAX_FNAME 9 /* max length of filename */ ++#define FILE_MAX_EXT 5 /* max length of extension */ ++#else ++/* ++The filename limits were increased in Xfract 3.02. But alas, ++in this poor program that was originally developed on the ++nearly-brain-dead DOS operating system, quite a few things ++in the UI would break if file names were bigger than DOS 8-3 ++names. So for now humor us and let's keep the names short. ++*/ ++#define FILE_MAX_FNAME 64 /* max length of filename */ ++#define FILE_MAX_EXT 64 /* max length of extension */ ++#endif ++ ++ + /* Uses big_access32(), big_set32(),... functions instead of macros. */ + /* Some little endian machines may require this as well. */ + #if BYTE_ORDER == BIG_ENDIAN +diff -urN ../xfractint-20.04p07-orig/headers/unix.h ../xfractint-20.04p07/headers/unix.h +--- ../xfractint-20.04p07-orig/headers/unix.h 2006-11-26 04:43:07 +0900 ++++ ../xfractint-20.04p07/headers/unix.h 2007-12-28 15:52:47 +0900 +@@ -28,8 +28,6 @@ + #define max(a,b) ((a)>(b)?(a):(b)) + #define min(a,b) ((a)<(b)?(a):(b)) + #define remove(x) unlink(x) +-#define _MAX_FNAME 20 +-#define _MAX_EXT 4 + #define chsize(fd,len) ftruncate(fd,len) + + #define inp(x) 0 +diff -urN ../xfractint-20.04p07-orig/unix/unix.c ../xfractint-20.04p07/unix/unix.c +--- ../xfractint-20.04p07-orig/unix/unix.c 2005-07-28 09:55:02 +0900 ++++ ../xfractint-20.04p07/unix/unix.c 2007-12-28 16:05:56 +0900 +@@ -15,12 +15,6 @@ + #include <ctype.h> + #include "port.h" + +-#define FILE_MAX_PATH 256 /* max length of path+filename */ +-#define FILE_MAX_DIR 256 /* max length of directory name */ +-#define FILE_MAX_DRIVE 3 /* max length of drive letter */ +-#define FILE_MAX_FNAME 9 /* max length of filename */ +-#define FILE_MAX_EXT 5 /* max length of extension */ +- + int iocount; + + /* diff --git a/x11-misc/xfractint/xfractint-20.04_p07.ebuild b/x11-misc/xfractint/xfractint-20.04_p07.ebuild index 397737c272fa..c907eaf2edad 100644 --- a/x11-misc/xfractint/xfractint-20.04_p07.ebuild +++ b/x11-misc/xfractint/xfractint-20.04_p07.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/xfractint/xfractint-20.04_p07.ebuild,v 1.2 2007/12/27 20:47:01 drac Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/xfractint/xfractint-20.04_p07.ebuild,v 1.3 2007/12/28 11:57:35 spock Exp $ inherit eutils toolchain-funcs @@ -25,6 +25,7 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-Makefile.patch + epatch "${FILESDIR}"/xfractint-20.04p07-filename-buffer-overflow-fix.patch } src_compile() { |