1 |
spock 07/12/28 11:57:36 |
2 |
|
3 |
Added: |
4 |
xfractint-20.04p07-filename-buffer-overflow-fix.patch |
5 |
Log: |
6 |
Add a fix for bug #203548 by Andrew Church <gentoo@×××××××.org>. |
7 |
(Portage version: 2.1.4_rc11) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 x11-misc/xfractint/files/xfractint-20.04p07-filename-buffer-overflow-fix.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-misc/xfractint/files/xfractint-20.04p07-filename-buffer-overflow-fix.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-misc/xfractint/files/xfractint-20.04p07-filename-buffer-overflow-fix.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: xfractint-20.04p07-filename-buffer-overflow-fix.patch |
16 |
=================================================================== |
17 |
diff -urN ../xfractint-20.04p07-orig/dos_help/hc.c ../xfractint-20.04p07/dos_help/hc.c |
18 |
--- ../xfractint-20.04p07-orig/dos_help/hc.c 2006-03-15 10:30:47 +0900 |
19 |
+++ ../xfractint-20.04p07/dos_help/hc.c 2007-12-28 16:05:53 +0900 |
20 |
@@ -72,8 +72,8 @@ |
21 |
# include <dir.h> |
22 |
# define FNSPLIT fnsplit |
23 |
#else |
24 |
-# define MAXFILE _MAX_FNAME |
25 |
-# define MAXEXT _MAX_EXT |
26 |
+# define MAXFILE FILE_MAX_FNAME |
27 |
+# define MAXEXT FILE_MAX_EXT |
28 |
# define FNSPLIT _splitpath |
29 |
#endif |
30 |
|
31 |
diff -urN ../xfractint-20.04p07-orig/headers/fractint.h ../xfractint-20.04p07/headers/fractint.h |
32 |
--- ../xfractint-20.04p07-orig/headers/fractint.h 2006-11-26 04:43:07 +0900 |
33 |
+++ ../xfractint-20.04p07/headers/fractint.h 2007-12-28 16:07:02 +0900 |
34 |
@@ -47,31 +47,6 @@ |
35 |
#define RESTORESTART 3 |
36 |
#define CONTINUE 4 |
37 |
|
38 |
-/* these are used to declare arrays for file names */ |
39 |
-#ifdef XFRACT |
40 |
-#define FILE_MAX_PATH 256 /* max length of path+filename */ |
41 |
-#define FILE_MAX_DIR 256 /* max length of directory name */ |
42 |
-#else |
43 |
-#define FILE_MAX_PATH 80 /* max length of path+filename */ |
44 |
-#define FILE_MAX_DIR 80 /* max length of directory name */ |
45 |
-#endif |
46 |
-#define FILE_MAX_DRIVE 3 /* max length of drive letter */ |
47 |
- |
48 |
-#if 1 |
49 |
-#define FILE_MAX_FNAME 9 /* max length of filename */ |
50 |
-#define FILE_MAX_EXT 5 /* max length of extension */ |
51 |
-#else |
52 |
-/* |
53 |
-The filename limits were increased in Xfract 3.02. But alas, |
54 |
-in this poor program that was originally developed on the |
55 |
-nearly-brain-dead DOS operating system, quite a few things |
56 |
-in the UI would break if file names were bigger than DOS 8-3 |
57 |
-names. So for now humor us and let's keep the names short. |
58 |
-*/ |
59 |
-#define FILE_MAX_FNAME 64 /* max length of filename */ |
60 |
-#define FILE_MAX_EXT 64 /* max length of extension */ |
61 |
-#endif |
62 |
- |
63 |
#define MAXMAXLINELENGTH 128 /* upper limit for maxlinelength for PARs */ |
64 |
#define MINMAXLINELENGTH 40 /* lower limit for maxlinelength for PARs */ |
65 |
|
66 |
diff -urN ../xfractint-20.04p07-orig/headers/port.h ../xfractint-20.04p07/headers/port.h |
67 |
--- ../xfractint-20.04p07-orig/headers/port.h 2006-11-26 04:43:07 +0900 |
68 |
+++ ../xfractint-20.04p07/headers/port.h 2007-12-28 16:11:15 +0900 |
69 |
@@ -260,6 +260,36 @@ |
70 |
#endif |
71 |
#endif |
72 |
|
73 |
+ |
74 |
+/* The following FILE_* #defines were moved here from fractint.h to |
75 |
+ * avoid inconsistent declarations in dos_help/hc.c and unix/unix.c. */ |
76 |
+ |
77 |
+/* these are used to declare arrays for file names */ |
78 |
+#ifdef XFRACT |
79 |
+#define FILE_MAX_PATH 256 /* max length of path+filename */ |
80 |
+#define FILE_MAX_DIR 256 /* max length of directory name */ |
81 |
+#else |
82 |
+#define FILE_MAX_PATH 80 /* max length of path+filename */ |
83 |
+#define FILE_MAX_DIR 80 /* max length of directory name */ |
84 |
+#endif |
85 |
+#define FILE_MAX_DRIVE 3 /* max length of drive letter */ |
86 |
+ |
87 |
+#if 1 |
88 |
+#define FILE_MAX_FNAME 9 /* max length of filename */ |
89 |
+#define FILE_MAX_EXT 5 /* max length of extension */ |
90 |
+#else |
91 |
+/* |
92 |
+The filename limits were increased in Xfract 3.02. But alas, |
93 |
+in this poor program that was originally developed on the |
94 |
+nearly-brain-dead DOS operating system, quite a few things |
95 |
+in the UI would break if file names were bigger than DOS 8-3 |
96 |
+names. So for now humor us and let's keep the names short. |
97 |
+*/ |
98 |
+#define FILE_MAX_FNAME 64 /* max length of filename */ |
99 |
+#define FILE_MAX_EXT 64 /* max length of extension */ |
100 |
+#endif |
101 |
+ |
102 |
+ |
103 |
/* Uses big_access32(), big_set32(),... functions instead of macros. */ |
104 |
/* Some little endian machines may require this as well. */ |
105 |
#if BYTE_ORDER == BIG_ENDIAN |
106 |
diff -urN ../xfractint-20.04p07-orig/headers/unix.h ../xfractint-20.04p07/headers/unix.h |
107 |
--- ../xfractint-20.04p07-orig/headers/unix.h 2006-11-26 04:43:07 +0900 |
108 |
+++ ../xfractint-20.04p07/headers/unix.h 2007-12-28 15:52:47 +0900 |
109 |
@@ -28,8 +28,6 @@ |
110 |
#define max(a,b) ((a)>(b)?(a):(b)) |
111 |
#define min(a,b) ((a)<(b)?(a):(b)) |
112 |
#define remove(x) unlink(x) |
113 |
-#define _MAX_FNAME 20 |
114 |
-#define _MAX_EXT 4 |
115 |
#define chsize(fd,len) ftruncate(fd,len) |
116 |
|
117 |
#define inp(x) 0 |
118 |
diff -urN ../xfractint-20.04p07-orig/unix/unix.c ../xfractint-20.04p07/unix/unix.c |
119 |
--- ../xfractint-20.04p07-orig/unix/unix.c 2005-07-28 09:55:02 +0900 |
120 |
+++ ../xfractint-20.04p07/unix/unix.c 2007-12-28 16:05:56 +0900 |
121 |
@@ -15,12 +15,6 @@ |
122 |
#include <ctype.h> |
123 |
#include "port.h" |
124 |
|
125 |
-#define FILE_MAX_PATH 256 /* max length of path+filename */ |
126 |
-#define FILE_MAX_DIR 256 /* max length of directory name */ |
127 |
-#define FILE_MAX_DRIVE 3 /* max length of drive letter */ |
128 |
-#define FILE_MAX_FNAME 9 /* max length of filename */ |
129 |
-#define FILE_MAX_EXT 5 /* max length of extension */ |
130 |
- |
131 |
int iocount; |
132 |
|
133 |
/* |
134 |
|
135 |
|
136 |
|
137 |
-- |
138 |
gentoo-commits@g.o mailing list |