1 |
bicatali 14/02/23 20:18:40 |
2 |
|
3 |
Added: funtools-1.4.4-fix-hardening.patch |
4 |
funtools-1.4.4-fix-crashes.patch |
5 |
Log: |
6 |
Add a few fixes from debian |
7 |
|
8 |
(Portage version: 2.2.8-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: funtools-1.4.4-fix-hardening.patch |
17 |
=================================================================== |
18 |
Author: Ole Streicher <debian@×××××××××.cx> |
19 |
Description: Fix the format string for fprintf |
20 |
--- a/gnu/sort.c |
21 |
+++ b/gnu/sort.c |
22 |
@@ -2775,7 +2775,7 @@ |
23 |
xfwrite (buf, 1, cc, ofp); |
24 |
if (ferror (fp)) |
25 |
{ |
26 |
- fprintf (stderr, files[i]); |
27 |
+ fprintf (stderr, "%s", files[i]); |
28 |
cleanup (); |
29 |
exit (2); |
30 |
} |
31 |
--- a/Makefile.in |
32 |
+++ b/Makefile.in |
33 |
@@ -137,7 +137,7 @@ |
34 |
|
35 |
CC = @CC@ |
36 |
|
37 |
-CC_SWITCHES = -I. ${CFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS} |
38 |
+CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS} |
39 |
|
40 |
DEPEND_SWITCHES = -I. ${CFLAGS} ${INCLUDES} ${AC_FLAGS} |
41 |
|
42 |
--- a/filter/Makefile.in |
43 |
+++ b/filter/Makefile.in |
44 |
@@ -114,7 +114,7 @@ |
45 |
|
46 |
CC = @CC@ |
47 |
|
48 |
-CC_SWITCHES = -I. ${CFLAGS} -DFILT_VERSION="\"$(VERSION)\"" @USE_DL@ \ |
49 |
+CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} -DFILT_VERSION="\"$(VERSION)\"" @USE_DL@ \ |
50 |
${INCLUDES} ${AC_FLAGS} |
51 |
|
52 |
DEPEND_SWITCHES = -I. ${CFLAGS} -I. ${INCLUDES} ${AC_FLAGS} |
53 |
--- a/gnu/Makefile.in |
54 |
+++ b/gnu/Makefile.in |
55 |
@@ -87,7 +87,7 @@ |
56 |
|
57 |
CC = @CC@ |
58 |
|
59 |
-CC_SWITCHES = ${CFLAGS} ${INCLUDES} ${AC_FLAGS} |
60 |
+CC_SWITCHES = ${CFLAGS} ${CPPFLAGS} ${INCLUDES} ${AC_FLAGS} |
61 |
|
62 |
DEPEND_SWITCHES = ${CFLAGS} ${INCLUDES} ${AC_FLAGS} |
63 |
|
64 |
--- a/util/Makefile.in |
65 |
+++ b/util/Makefile.in |
66 |
@@ -105,7 +105,7 @@ |
67 |
|
68 |
CC = @CC@ |
69 |
|
70 |
-CC_SWITCHES = -I. ${CFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS} |
71 |
+CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS} |
72 |
|
73 |
DEPEND_SWITCHES = -I. ${CFLAGS} ${INCLUDES} ${AC_FLAGS} |
74 |
|
75 |
--- a/mklib |
76 |
+++ b/mklib |
77 |
@@ -169,7 +169,7 @@ |
78 |
rm -f ${LIBNAME}.so |
79 |
|
80 |
# make lib |
81 |
- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} |
82 |
+ ${LINK} ${LDFLAGS} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} |
83 |
# make usual symlinks |
84 |
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} |
85 |
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so |
86 |
|
87 |
|
88 |
|
89 |
1.1 sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch |
90 |
|
91 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch?rev=1.1&view=markup |
92 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch?rev=1.1&content-type=text/plain |
93 |
|
94 |
Index: funtools-1.4.4-fix-crashes.patch |
95 |
=================================================================== |
96 |
Author: Ole Streicher <debian@×××××××××.cx> |
97 |
Description: Check cmd line arguments for illegal input that caused crashes |
98 |
found with the "Mayhem" tool. |
99 |
Bug: http://bugs.debian.org/715928 |
100 |
Bug: http://bugs.debian.org/715929 |
101 |
--- a/funjoin.c |
102 |
+++ b/funjoin.c |
103 |
@@ -737,7 +737,7 @@ main(argc, argv) |
104 |
case 'a': |
105 |
if( argv[i][2] ){ |
106 |
j = atoi(&argv[i][2])-1; |
107 |
- if( (j >= 0) && (j < MAXIFILE) ){ |
108 |
+ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){ |
109 |
files[j].actstr = argv[++i]; |
110 |
} |
111 |
else{ |
112 |
@@ -751,7 +751,7 @@ main(argc, argv) |
113 |
case 'b': |
114 |
if( argv[i][2] ){ |
115 |
j = atoi(&argv[i][2])-1; |
116 |
- if( (j >= 0) && (j < MAXIFILE) ){ |
117 |
+ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){ |
118 |
files[j].bstr = argv[++i]; |
119 |
} |
120 |
else{ |
121 |
@@ -765,7 +765,7 @@ main(argc, argv) |
122 |
case 'j': |
123 |
if( argv[i][2] ){ |
124 |
j = atoi(&argv[i][2])-1; |
125 |
- if( (j >= 0) && (j < MAXIFILE) ){ |
126 |
+ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){ |
127 |
files[j].jname = argv[++i]; |
128 |
} |
129 |
else{ |
130 |
@@ -773,25 +773,35 @@ main(argc, argv) |
131 |
} |
132 |
} |
133 |
else{ |
134 |
- defcol = argv[++i]; |
135 |
+ if (i < argc-1) { |
136 |
+ defcol = argv[++i]; |
137 |
+ } |
138 |
} |
139 |
break; |
140 |
case 'm': |
141 |
- minmatch = atoi(argv[++i])+1; |
142 |
+ if (i < argc-1) { |
143 |
+ minmatch = atoi(argv[++i])+1; |
144 |
+ } |
145 |
if( minmatch < 1 ) minmatch = 1; |
146 |
break; |
147 |
case 'M': |
148 |
- maxmatch = atoi(argv[++i])+1; |
149 |
+ if (i < argc-1) { |
150 |
+ maxmatch = atoi(argv[++i])+1; |
151 |
+ } |
152 |
if( maxmatch < 1 ) maxmatch = 1; |
153 |
break; |
154 |
case 's': |
155 |
jfiles = JFILES_COL; |
156 |
break; |
157 |
case 'S': |
158 |
- jfiles = argv[++i]; |
159 |
+ if (i < argc-1) { |
160 |
+ jfiles = argv[++i]; |
161 |
+ } |
162 |
break; |
163 |
case 't': |
164 |
- tol = atof(argv[++i]); |
165 |
+ if (i < argc-1) { |
166 |
+ tol = atof(argv[++i]); |
167 |
+ } |
168 |
if( tol <= 0 ){ |
169 |
gerror(stderr, "tolerance value must be positive\n"); |
170 |
} |
171 |
--- a/funimage.c |
172 |
+++ b/funimage.c |
173 |
@@ -338,12 +338,16 @@ main(argc, argv) |
174 |
t = strchr(s, ','); |
175 |
strncat(newname, s, t-s); |
176 |
strncat(newname, ",y:", SZ_LINE-strlen(newname)); |
177 |
- s = ++t; |
178 |
- t = strchr(s, ','); |
179 |
- strncat(newname, s, t-s); |
180 |
+ if (t != NULL) { |
181 |
+ s = ++t; |
182 |
+ t = strchr(s, ','); |
183 |
+ strncat(newname, s, t-s); |
184 |
+ } |
185 |
strncat(newname, "),", SZ_LINE-strlen(newname)); |
186 |
- s = ++t; |
187 |
- strncat(newname, s, SZ_LINE-strlen(newname)); |
188 |
+ if (t != NULL) { |
189 |
+ s = ++t; |
190 |
+ strncat(newname, s, SZ_LINE-strlen(newname)); |
191 |
+ } |
192 |
iname = newname; |
193 |
} |