summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2004-09-28 05:32:26 +0000
committerMamoru Komachi <usata@gentoo.org>2004-09-28 05:32:26 +0000
commit7bc42f896f4585984ec7d86c3cbfb6f6c848ba2e (patch)
tree527af93d89986af7a757e350c68fd331c14672ba /dev-tex/latex2rtf
parentfix installation of sound packages, bug #65578 (diff)
downloadhistorical-7bc42f896f4585984ec7d86c3cbfb6f6c848ba2e.tar.gz
historical-7bc42f896f4585984ec7d86c3cbfb6f6c848ba2e.tar.bz2
historical-7bc42f896f4585984ec7d86c3cbfb6f6c848ba2e.zip
Added a security fix extracted from Debian's patch. See bug #64947.
Diffstat (limited to 'dev-tex/latex2rtf')
-rw-r--r--dev-tex/latex2rtf/ChangeLog8
-rw-r--r--dev-tex/latex2rtf/Manifest5
-rw-r--r--dev-tex/latex2rtf/files/digest-latex2rtf-1.9.15-r21
-rw-r--r--dev-tex/latex2rtf/files/latex2rtf-1.9.15-definitions.c.diff51
-rw-r--r--dev-tex/latex2rtf/latex2rtf-1.9.15-r2.ebuild42
5 files changed, 105 insertions, 2 deletions
diff --git a/dev-tex/latex2rtf/ChangeLog b/dev-tex/latex2rtf/ChangeLog
index 478b2364186f..6b57f8d0bd0f 100644
--- a/dev-tex/latex2rtf/ChangeLog
+++ b/dev-tex/latex2rtf/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-tex/latex2rtf
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-tex/latex2rtf/ChangeLog,v 1.9 2004/08/27 23:06:43 kugelfang Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-tex/latex2rtf/ChangeLog,v 1.10 2004/09/28 05:32:26 usata Exp $
+
+*latex2rtf-1.9.15-r2 (28 Sep 2004)
+
+ 28 Sep 2004; Mamoru KOMACHI <usata@gentoo.org>
+ +files/latex2rtf-1.9.15-definitions.c.diff, +latex2rtf-1.9.15-r2.ebuild:
+ Added a security fix extracted from Debian's patch. See bug #64947.
28 Aug 2004; Danny van Dyk <kugelfang@gentoo.org>
latex2rtf-1.9.15-r1.ebuild:
diff --git a/dev-tex/latex2rtf/Manifest b/dev-tex/latex2rtf/Manifest
index 0560c1432431..fb2bdef51abc 100644
--- a/dev-tex/latex2rtf/Manifest
+++ b/dev-tex/latex2rtf/Manifest
@@ -1,6 +1,9 @@
-MD5 cf737034845bd0b54deb12f9af85d43f ChangeLog 1415
+MD5 320ff8bc22c39e17a9123085001a6cab ChangeLog 1643
+MD5 90996d40e257dcaa4098855a5e603050 latex2rtf-1.9.15-r2.ebuild 1045
MD5 c472f5fd1646eb8bca71d8df5cb2bdcc metadata.xml 164
MD5 a45bee43bcfb6dbf18205d50980d37ee latex2rtf-1.9.15-r1.ebuild 1005
MD5 0cd549e56f3f8b6d885f04ee983d8661 files/digest-latex2rtf-1.9.15-r1 68
MD5 5c38ae853a717a1ba595c9b1c29b570b files/latex2rtf-Makefile-gentoo.diff 2211
MD5 8bfc1664436da66fbf401f933c853ff6 files/latex2rtf-1.9.15-direntry.patch 1179
+MD5 ef5b6998b580eb0f55b60c794ab72215 files/latex2rtf-1.9.15-definitions.c.diff 1349
+MD5 0cd549e56f3f8b6d885f04ee983d8661 files/digest-latex2rtf-1.9.15-r2 68
diff --git a/dev-tex/latex2rtf/files/digest-latex2rtf-1.9.15-r2 b/dev-tex/latex2rtf/files/digest-latex2rtf-1.9.15-r2
new file mode 100644
index 000000000000..64ea060bdc7b
--- /dev/null
+++ b/dev-tex/latex2rtf/files/digest-latex2rtf-1.9.15-r2
@@ -0,0 +1 @@
+MD5 5aa723f290aa745ee3a37c3814901956 latex2rtf-1.9.15.tar.gz 605467
diff --git a/dev-tex/latex2rtf/files/latex2rtf-1.9.15-definitions.c.diff b/dev-tex/latex2rtf/files/latex2rtf-1.9.15-definitions.c.diff
new file mode 100644
index 000000000000..68f706aaa2f6
--- /dev/null
+++ b/dev-tex/latex2rtf/files/latex2rtf-1.9.15-definitions.c.diff
@@ -0,0 +1,51 @@
+--- latex2rtf-1.9.15.orig/definitions.c
++++ latex2rtf-1.9.15/definitions.c
+@@ -110,7 +110,8 @@
+ **************************************************************************/
+ {
+ int i=0,param;
+- char * args[9], *dmacro, *macro_piece, *next_piece, *expanded, buffer[1024], *cs;
++ char * args[9], *dmacro, *macro_piece, *next_piece, *expanded, *buffer = NULL, *cs;
++ int max_len = 0;
+
+ if (params<=0)
+ return strdup(macro);
+@@ -118,18 +119,28 @@
+ if (opt_param) {
+ args[i++] = getBracketParam();
+ if (!args[0]) args[0] = strdup(opt_param);
++ max_len += strlen(args[i-1]);
+ }
+
+ for (; i<params; i++) {
+ args[i] = getBraceParam();
++ max_len += strlen(args[i]);
+ diagnostics(3, "argument #%d <%s>", i+1, args[i]);
+ }
++
+
+- *buffer='\0';
+- expanded = buffer;
+ dmacro = strdup(macro);
+ macro_piece = dmacro;
++ max_len += strlen(macro_piece);
++
++ diagnostics(3, "max_len in expandmacro = %d\n", max_len);
++ if(max_len > 0) {
++ buffer = (char*)malloc(sizeof(char) * max_len);
++ memset(buffer,'\0',max_len);
++ }
+
++ expanded = buffer;
++
+ /* convert "\csname" to "\" */
+ while ((cs=strstr(dmacro, "\\csname")) != NULL) strcpy(cs+1,cs+7);
+
+@@ -176,6 +187,7 @@
+ if (args[i]) free(args[i]);
+
+ if (dmacro) free(dmacro);
++ if (buffer) free(buffer);
+
+ diagnostics(3, "expandmacro expanded=<%s>", buffer);
+ return strdup(buffer);
diff --git a/dev-tex/latex2rtf/latex2rtf-1.9.15-r2.ebuild b/dev-tex/latex2rtf/latex2rtf-1.9.15-r2.ebuild
new file mode 100644
index 000000000000..fac145fc0683
--- /dev/null
+++ b/dev-tex/latex2rtf/latex2rtf-1.9.15-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-tex/latex2rtf/latex2rtf-1.9.15-r2.ebuild,v 1.1 2004/09/28 05:32:26 usata Exp $
+
+inherit eutils gcc
+
+DESCRIPTION="LaTeX to RTF converter"
+HOMEPAGE="http://latex2rtf.sourceforge.net/"
+SRC_URI="mirror://sourceforge/latex2rtf/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~ppc ~sparc ~amd64"
+SLOT="0"
+IUSE="doc"
+
+DEPEND="virtual/libc
+ virtual/tetex
+ media-gfx/imagemagick"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${P}-definitions.c.diff
+ epatch ${FILESDIR}/${PN}-Makefile-gentoo.diff
+ epatch ${FILESDIR}/${P}-direntry.patch
+}
+
+src_compile() {
+ emake CC=$(gcc-getCC) || die
+}
+
+src_install() {
+ PREFIX=${D}/usr make -e install || die
+ dodoc README doc/latex2rtf.txt
+ # if doc is not used, only the text version is intalled.
+ if use doc; then
+ dohtml doc/latex2rtf.html
+ dodoc doc/latex2rtf.pdf doc/latex2rtf.txt
+ sed -i "s/\r/\n/g" doc/latex2rtf.info
+ doinfo doc/latex2rtf.info
+ fi
+}