Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 139484 Details for
Bug 203548
x11-misc/xfractint-20.04_p07 crashes during build
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to xfractint source to make buffer sizes consistent
xfractint-20.04p07-filename-buffer-overflow-fix.patch (text/plain), 4.58 KB, created by
Andrew Church
on 2007-12-28 07:18:48 UTC
(
hide
)
Description:
Patch to xfractint source to make buffer sizes consistent
Filename:
MIME Type:
Creator:
Andrew Church
Created:
2007-12-28 07:18:48 UTC
Size:
4.58 KB
patch
obsolete
>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; > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 203548
: 139484