1 |
matsuu 09/09/30 14:25:01 |
2 |
|
3 |
Added: ptex-3.1.10_p20090610-gentoo.patch |
4 |
ptex-3.1.10_p20090610-getline.patch |
5 |
CVE-2009-1284.patch |
6 |
Log: |
7 |
Fixed #126092, #223793, #226877, #284825 and #282874. |
8 |
(Portage version: 2.1.6.13/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 app-text/ptex/files/ptex-3.1.10_p20090610-gentoo.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ptex/files/ptex-3.1.10_p20090610-gentoo.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ptex/files/ptex-3.1.10_p20090610-gentoo.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: ptex-3.1.10_p20090610-gentoo.patch |
17 |
=================================================================== |
18 |
--- ptetex3-20090610.orig/2extract-src.sh 2009-06-07 10:00:07.000000000 +0200 |
19 |
+++ ptetex3-20090610/2extract-src.sh 2009-09-16 08:05:52.000000000 +0200 |
20 |
@@ -147,25 +147,25 @@ |
21 |
$MKDIR $SRC/texk/pdvipsk |
22 |
$CP $SRC/texk/dvipsk/* $SRC/texk/pdvipsk/ 2> /dev/null |
23 |
tarcp $SRC/texk/xdvik $SRC/texk/pxdvik |
24 |
- P=p |
25 |
+ DVIPSK_P=p |
26 |
fi # "$JAPANESE" = "international" |
27 |
## for dvipsk |
28 |
-#tarx archive/dvipsk-jpatch-p*.tar.gz $SRC/texk/${P}dvipsk |
29 |
-#cpatch $SRC/texk/${P}dvipsk/dvipsk-*.patch 1 $SRC/texk/${P}dvipsk |
30 |
-tarx archive/dvipsk-*-p*.tar.gz $SRC/texk/${P}dvipsk |
31 |
-cpatch $SRC/texk/${P}dvipsk/dvipsk-*.diff 1 $SRC/texk/${P}dvipsk |
32 |
-perlprint 's/^kpse_include/ac_include/g' $SRC/texk/${P}dvipsk/Makefile.in |
33 |
+#tarx archive/dvipsk-jpatch-p*.tar.gz $SRC/texk/${DVIPSK_P}dvipsk |
34 |
+#cpatch $SRC/texk/${DVIPSK_P}dvipsk/dvipsk-*.patch 1 $SRC/texk/${DVIPSK_P}dvipsk |
35 |
+tarx archive/dvipsk-*-p*.tar.gz $SRC/texk/${DVIPSK_P}dvipsk |
36 |
+cpatch $SRC/texk/${DVIPSK_P}dvipsk/dvipsk-*.diff 1 $SRC/texk/${DVIPSK_P}dvipsk |
37 |
+perlprint 's/^kpse_include/ac_include/g' $SRC/texk/${DVIPSK_P}dvipsk/Makefile.in |
38 |
|
39 |
## for xdvik |
40 |
-zpatch archive/xdvik-200?????-tetex-3.0.diff.gz 3 $SRC/texk/${P}xdvik |
41 |
+zpatch archive/xdvik-200?????-tetex-3.0.diff.gz 3 $SRC/texk/${DVIPSK_P}xdvik |
42 |
# fix for FC5 |
43 |
perlprint 'print "#define NeedWidePrototypes 1\n" if /limits/' \ |
44 |
- $SRC/texk/${P}xdvik/xdvi.h |
45 |
+ $SRC/texk/${DVIPSK_P}xdvik/xdvi.h |
46 |
# pTeX fontmap |
47 |
perlnoprint "s/^ptexmap .*/ptexmap kanjix.map/; print unless /IPA/" \ |
48 |
- $SRC/texk/${P}xdvik/texmf/xdvi.cfg |
49 |
+ $SRC/texk/${DVIPSK_P}xdvik/texmf/xdvi.cfg |
50 |
# adjust X resource |
51 |
-cat <<EOF >> $SRC/texk/${P}xdvik/texmf/XDvi || exit 1 |
52 |
+cat <<EOF >> $SRC/texk/${DVIPSK_P}xdvik/texmf/XDvi || exit 1 |
53 |
|
54 |
|
55 |
!!! ------- added by ptetex3 ------- |
56 |
--- ptetex3-20090610.orig/4make-install.sh 2009-05-04 18:35:49.000000000 +0200 |
57 |
+++ ptetex3-20090610/4make-install.sh 2009-09-16 08:40:47.000000000 +0200 |
58 |
@@ -44,11 +44,9 @@ |
59 |
|
60 |
echo "[--tetex--] configure" |
61 |
cd $SRC || exit |
62 |
-$MKDIR $PREFIX/share/texmf 2> /dev/null # avoid warning of texmf tree |
63 |
./configure --prefix=$PREFIX --datadir=$DATADIR \ |
64 |
--disable-multiplatform --with-ptexenc=$KANJI_CODE \ |
65 |
$CONF_OPTION || exit |
66 |
-$RMDIR $PREFIX/share/texmf 2> /dev/null # avoid warning of texmf tree |
67 |
xdvi_check |
68 |
echo "[--tetex--] make" |
69 |
$MAKE $MAKE_OPTION || exit |
70 |
diff -Naur ptetex3-20090610.orig/7font-search.sh ptetex3-20090610/7font-search.sh |
71 |
--- ptetex3-20090610.orig/7font-search.sh 2008-04-14 18:07:04.000000000 +0900 |
72 |
+++ ptetex3-20090610/7font-search.sh 2008-05-10 09:36:33.000000000 +0900 |
73 |
@@ -58,6 +58,17 @@ |
74 |
done |
75 |
} |
76 |
|
77 |
+mksymlink_gentoo(){ |
78 |
+ $MKDIR $TRUETYPE |
79 |
+ fonts_dir=/usr/share/fonts/ |
80 |
+ find $fonts_dir -maxdepth 1 -mindepth 1 -type d | while read font_path; do |
81 |
+ if [ `find $font_path -maxdepth 1 -type f -iname '*.ttf' | wc -l` -gt 0 ]; then |
82 |
+ font_name=${font_path/$fonts_dir/} |
83 |
+ test -h ${TRUETYPE}/${font_name} && continue |
84 |
+ $LN "${font_path}" "${TRUETYPE}/${font_name}" |
85 |
+ fi |
86 |
+ done |
87 |
+} |
88 |
|
89 |
setrmlgbm() { |
90 |
if test -n "$2"; then |
91 |
@@ -111,10 +122,10 @@ |
92 |
|
93 |
mksymlink $CMAP <<EOF |
94 |
### リンク名 検索ディレクトリ/ファイル |
95 |
-Acrobat4 /usr{,/local,/sfw}{,/lib}/Acrobat4/Resource/CMap |
96 |
-Acrobat5 /usr{,/local,/sfw}{,/lib}/Acrobat5/Resource/Font |
97 |
-Acrobat7 /usr{,/local,/sfw}{,/lib}{,/Adobe}/Acrobat7.0/Resource/CMap |
98 |
-Acrobat8 /usr{,/local,/sfw}{,/lib}{,/Adobe}/Acrobat8.0/Resource/CMap |
99 |
+Acrobat4 {/opt,/usr{,/local,/sfw}{,/lib}}/Acrobat4/Resource/CMap |
100 |
+Acrobat5 {/opt,/usr{,/local,/sfw}{,/lib}}/Acrobat5/Resource/Font |
101 |
+Acrobat7 {/opt,/usr{,/local,/sfw}{,/lib}}{,/Adobe}/Acrobat7{,.0}/Resource/CMap |
102 |
+Acrobat8 {/opt,/usr{,/local,/sfw}{,/lib}}{,/Adobe}/{Acrobat,Reader}8{,.0}/Resource/CMap |
103 |
ghostscript /usr{,/local,/sfw}/{share,lib}/ghostscript{,/*}/Resource/CMap |
104 |
openwinja /usr/openwin/lib/locale/ja/X11/Resource/CMap |
105 |
openwinko /usr/openwin/lib/locale/ko/X11/Resource/CMap |
106 |
@@ -122,21 +133,7 @@ |
107 |
openwintw /usr/openwin/lib/locale/zh_TW.BIG5/X11/Resource/CMap |
108 |
EOF |
109 |
|
110 |
-mksymlink $TRUETYPE <<EOF |
111 |
-### リンク名 検索ディレクトリ/ファイル |
112 |
-x11 /usr{,/local,/X11R6,/pkg}/lib/X11/fonts/truetype |
113 |
-X11 /usr{,/local,/X11R6,/pkg}/lib/X11/fonts/TrueType |
114 |
-X11TTF /usr{,/local,/X11R6,/pkg}/lib/X11/fonts/TTF |
115 |
-truetype /usr{,/local}/share/fonts/truetype |
116 |
-TrueType /usr{,/local}/share/fonts/TrueType |
117 |
-TTF /usr{,/local}/share/fonts/TTF |
118 |
-ja /usr{,/local}/share/fonts/ja/TrueType |
119 |
-japanese /usr{,/local}/share/fonts/japanese/TrueType |
120 |
-openwin /usr/openwin/lib/locale/ja/X11/fonts/TT |
121 |
-QtPalmtop /opt/QtPalmtop/lib/X11/fonts/TrueType |
122 |
-f8sazanami-min /usr/share/fonts/sazanami-fonts-mincho |
123 |
-f8sazanami-goth /usr/share/fonts/sazanami-fonts-gothic |
124 |
-EOF |
125 |
+mksymlink_gentoo |
126 |
|
127 |
mksymlink $OPENTYPE <<EOF |
128 |
### リンク名 検索ディレクトリ/ファイル |
129 |
diff -Naur ptetex3-20090610.orig/common.sh ptetex3-20090610/common.sh |
130 |
--- ptetex3-20090610.orig/common.sh 2008-04-05 17:51:07.000000000 +0900 |
131 |
+++ ptetex3-20090610/common.sh 2008-05-10 09:47:00.000000000 +0900 |
132 |
@@ -220,12 +220,12 @@ |
133 |
echo "You are root." |
134 |
echo "It is RECOMMENDED to execute by a user." |
135 |
echo "Executing by root may cause SERIOUS DAMAGE for your system." |
136 |
- echo -n "Are you sure to execute by root AT YOUR OWN RISK? (yes/NO) " |
137 |
- read REPLY |
138 |
- case $REPLY in |
139 |
- yes) ;; |
140 |
- *) exit 1;; |
141 |
- esac |
142 |
+# echo -n "Are you sure to execute by root AT YOUR OWN RISK? (yes/NO) " |
143 |
+# read REPLY |
144 |
+# case $REPLY in |
145 |
+# yes) ;; |
146 |
+# *) exit 1;; |
147 |
+# esac |
148 |
fi |
149 |
} |
150 |
|
151 |
|
152 |
|
153 |
|
154 |
1.1 app-text/ptex/files/ptex-3.1.10_p20090610-getline.patch |
155 |
|
156 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ptex/files/ptex-3.1.10_p20090610-getline.patch?rev=1.1&view=markup |
157 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ptex/files/ptex-3.1.10_p20090610-getline.patch?rev=1.1&content-type=text/plain |
158 |
|
159 |
Index: ptex-3.1.10_p20090610-getline.patch |
160 |
=================================================================== |
161 |
diff -Naur tetex-src-3.0.orig/texk/dvipsk/afm2tfm.c tetex-src-3.0/texk/dvipsk/afm2tfm.c |
162 |
--- tetex-src-3.0.orig/texk/dvipsk/afm2tfm.c 2005-01-30 22:17:09.000000000 +0900 |
163 |
+++ tetex-src-3.0/texk/dvipsk/afm2tfm.c 2009-09-29 08:47:30.000000000 +0900 |
164 |
@@ -257,7 +257,7 @@ |
165 |
} |
166 |
|
167 |
int |
168 |
-getline P1H(void) { |
169 |
+_getline P1H(void) { |
170 |
register char *p ; |
171 |
register int c ; |
172 |
|
173 |
@@ -606,7 +606,7 @@ |
174 |
ai = newchar() ; |
175 |
ai->adobenum = -1 ; |
176 |
ai->adobename = "||" ; /* boundary character name */ |
177 |
- while (getline()) { |
178 |
+ while (_getline()) { |
179 |
switch(interest(paramstring())) { |
180 |
case FontName: |
181 |
fontname = paramnewstring() ; |
182 |
@@ -1882,7 +1882,7 @@ |
183 |
|
184 |
while (1) { |
185 |
while (param == 0 || *param == 0) { |
186 |
- if (getline() == 0) |
187 |
+ if (_getline() == 0) |
188 |
error("! premature end in encoding file") ; |
189 |
for (p=buffer; *p; p++) |
190 |
if (*p == '%') { |
191 |
@@ -1973,7 +1973,7 @@ |
192 |
p = gettoken() ; |
193 |
if (strcmp(p, "]")) |
194 |
error("! token 258 in encoding must be make-array (])") ; |
195 |
- while (getline()) { |
196 |
+ while (_getline()) { |
197 |
for (p=buffer; *p; p++) |
198 |
if (*p == '%') { |
199 |
if (ignoreligkern == 0) |
200 |
diff -Naur tetex-src-3.0.orig/texk/web2c/cpascal.h tetex-src-3.0/texk/web2c/cpascal.h |
201 |
--- tetex-src-3.0.orig/texk/web2c/cpascal.h 2004-08-29 05:49:59.000000000 +0900 |
202 |
+++ tetex-src-3.0/texk/web2c/cpascal.h 2009-09-29 23:09:57.000000000 +0900 |
203 |
@@ -14,6 +14,7 @@ |
204 |
|
205 |
/* We must include this first, to resolve many C issues. */ |
206 |
#include "config.h" |
207 |
+#define getline _getline |
208 |
|
209 |
/* We only use getopt in the applications, not in web2c itself. */ |
210 |
#include <kpathsea/getopt.h> |
211 |
diff -Naur tetex-src-3.0.orig/texk/web2c/mpware/mpto.c tetex-src-3.0/texk/web2c/mpware/mpto.c |
212 |
--- tetex-src-3.0.orig/texk/web2c/mpware/mpto.c 2004-07-15 02:40:35.000000000 +0900 |
213 |
+++ tetex-src-3.0/texk/web2c/mpware/mpto.c 2009-09-29 23:09:35.000000000 +0900 |
214 |
@@ -95,7 +95,7 @@ |
215 |
exit(1); |
216 |
} |
217 |
|
218 |
-char *getline() /* returns NULL on EOF or error, otherwise buf */ |
219 |
+char *_getline() /* returns NULL on EOF or error, otherwise buf */ |
220 |
{ |
221 |
int c; |
222 |
unsigned loc = 0; |
223 |
@@ -203,10 +203,10 @@ |
224 |
|
225 |
while (*aa==' ' || *aa=='\t') aa++; |
226 |
if (*aa==0) |
227 |
- if ((aa=getline())==NULL) |
228 |
+ if ((aa=_getline())==NULL) |
229 |
err("btex section does not end"); |
230 |
do { if (*aa==0) |
231 |
- if ((aa=getline())==NULL) |
232 |
+ if ((aa=_getline())==NULL) |
233 |
err("btex section does not end"); |
234 |
else printf("\n"); |
235 |
if (getbta(aa) && *tt=='e') { |
236 |
@@ -372,7 +372,7 @@ |
237 |
postverb = troff_postverb; |
238 |
} |
239 |
printf("%s",predoc); |
240 |
- while (getline()!=NULL) |
241 |
+ while (_getline()!=NULL) |
242 |
do_line(); |
243 |
printf("%s",postdoc); |
244 |
free(buf); |
245 |
|
246 |
|
247 |
|
248 |
1.1 app-text/ptex/files/CVE-2009-1284.patch |
249 |
|
250 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ptex/files/CVE-2009-1284.patch?rev=1.1&view=markup |
251 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/ptex/files/CVE-2009-1284.patch?rev=1.1&content-type=text/plain |
252 |
|
253 |
Index: CVE-2009-1284.patch |
254 |
=================================================================== |
255 |
--- tetex-src-3.0.orig/texk/web2c/bibtex.ch 2004-07-15 02:32:51.000000000 +0900 |
256 |
+++ tetex-src-3.0/texk/web2c/bibtex.ch 2009-09-30 08:11:22.000000000 +0900 |
257 |
@@ -1077,6 +1077,15 @@ |
258 |
@y |
259 |
@z |
260 |
|
261 |
+% Forgot to check for pool overflow here. Triggered by test case linked |
262 |
+% from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520920. |
263 |
+@x |
264 |
+while (sp_ptr < sp_end) do {shift the substring} |
265 |
+@y |
266 |
+str_room(sp_end - sp_ptr); |
267 |
+while (sp_ptr < sp_end) do {shift the substring} |
268 |
+@z |
269 |
+ |
270 |
% [459] Eliminate unreferenced statement label, because `undefined' is |
271 |
% now a constant expression that is not evaluated at the Web level. If |
272 |
% this label were ever required, it could be replaced by the constant |