From 4521898108402ee30e9af6e938214c80001cd507 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Sun, 2 Dec 2007 22:35:22 +0000 Subject: make a patchset tarball (Portage version: 2.1.4_rc4) --- app-text/texlive-core/ChangeLog | 13 +- .../files/2007/tetex-3.0-CVE-2007-0650.patch | 80 --- .../2007/tetex-3.0_p1-xpdf-CVE-2007-3387.patch | 16 - ...live-core-2007-bump_makeindex_limitations.patch | 33 -- .../texlive-core-2007-dvips_bufferoverflow.patch | 87 --- .../texlive-core-2007-icu-xetex-execstacks.patch | 12 - .../texlive-core-2007-libteckit-asneeded.patch | 13 - .../files/2007/texlive-core-2007-mpware.patch | 11 - .../texlive-core/files/2007/xpdf-3.02pl2.patch | 640 --------------------- .../texlive-core/files/digest-texlive-core-2007-r8 | 6 +- app-text/texlive-core/texlive-core-2007-r8.ebuild | 36 +- 11 files changed, 23 insertions(+), 924 deletions(-) delete mode 100644 app-text/texlive-core/files/2007/tetex-3.0-CVE-2007-0650.patch delete mode 100644 app-text/texlive-core/files/2007/tetex-3.0_p1-xpdf-CVE-2007-3387.patch delete mode 100644 app-text/texlive-core/files/2007/texlive-core-2007-bump_makeindex_limitations.patch delete mode 100644 app-text/texlive-core/files/2007/texlive-core-2007-dvips_bufferoverflow.patch delete mode 100644 app-text/texlive-core/files/2007/texlive-core-2007-icu-xetex-execstacks.patch delete mode 100644 app-text/texlive-core/files/2007/texlive-core-2007-libteckit-asneeded.patch delete mode 100644 app-text/texlive-core/files/2007/texlive-core-2007-mpware.patch delete mode 100644 app-text/texlive-core/files/2007/xpdf-3.02pl2.patch (limited to 'app-text') diff --git a/app-text/texlive-core/ChangeLog b/app-text/texlive-core/ChangeLog index 1230a2c0db35..fd42ab2eb1fe 100644 --- a/app-text/texlive-core/ChangeLog +++ b/app-text/texlive-core/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for app-text/texlive-core # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/ChangeLog,v 1.30 2007/11/21 20:45:39 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/ChangeLog,v 1.31 2007/12/02 22:35:21 aballier Exp $ + + 02 Dec 2007; Alexis Ballier + -files/2007/tetex-3.0-CVE-2007-0650.patch, + -files/2007/tetex-3.0_p1-xpdf-CVE-2007-3387.patch, + -files/2007/xpdf-3.02pl2.patch, + -files/2007/texlive-core-2007-bump_makeindex_limitations.patch, + -files/2007/texlive-core-2007-dvips_bufferoverflow.patch, + -files/2007/texlive-core-2007-icu-xetex-execstacks.patch, + -files/2007/texlive-core-2007-libteckit-asneeded.patch, + -files/2007/texlive-core-2007-mpware.patch, texlive-core-2007-r8.ebuild: + make a patchset tarball 21 Nov 2007; Alexis Ballier +files/2007/texlive-core-2007-bump_makeindex_limitations.patch, diff --git a/app-text/texlive-core/files/2007/tetex-3.0-CVE-2007-0650.patch b/app-text/texlive-core/files/2007/tetex-3.0-CVE-2007-0650.patch deleted file mode 100644 index 4df77e5dd8f1..000000000000 --- a/app-text/texlive-core/files/2007/tetex-3.0-CVE-2007-0650.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- tetex-src-3.0/texk/makeindexk/mkind.c.CVE-2007-0650 2002-10-02 14:26:37.000000000 +0200 -+++ tetex-src-3.0/texk/makeindexk/mkind.c 2007-02-02 12:29:31.000000000 +0100 -@@ -179,7 +179,9 @@ - argc--; - if (argc <= 0) - FATAL("Expected -p \n",""); -- strcpy(pageno, *++argv); -+ if (strlen(*++argv) >= sizeof(pageno)) -+ FATAL("Page number too high\n",""); -+ strcpy(pageno, *argv); - init_page = TRUE; - if (STREQ(pageno, EVEN)) { - log_given = TRUE; -@@ -230,7 +232,7 @@ - char tmp[STRING_MAX + 5]; - - /* base set by last call to check_idx */ -- sprintf (tmp, "%s%s", base, INDEX_STY); -+ snprintf (tmp, sizeof(tmp), "%s%s", base, INDEX_STY); - if (0 == access(tmp, R_OK)) { - open_sty (tmp); - sty_given = TRUE; -@@ -405,9 +407,9 @@ - STRING_MAX,totmem); - #endif /* DEBUG */ - -- if ((idx_fn = (char *) malloc(STRING_MAX)) == NULL) -+ if ((idx_fn = (char *) malloc(STRING_MAX+5)) == NULL) - FATAL("Not enough core...abort.\n", ""); -- sprintf(idx_fn, "%s%s", base, INDEX_IDX); -+ snprintf(idx_fn, STRING_MAX+5, "%s%s", base, INDEX_IDX); - if ((open_fn && - ((idx_fp = OPEN_IN(idx_fn)) == NULL) - ) || -@@ -434,7 +436,7 @@ - - /* index output file */ - if (!ind_given) { -- sprintf(ind, "%s%s", base, INDEX_IND); -+ snprintf(ind, sizeof(ind), "%s%s", base, INDEX_IND); - ind_fn = ind; - } - if ((ind_fp = OPEN_OUT(ind_fn)) == NULL) -@@ -442,14 +444,14 @@ - - /* index transcript file */ - if (!ilg_given) { -- sprintf(ilg, "%s%s", base, INDEX_ILG); -+ snprintf(ilg, sizeof(ilg), "%s%s", base, INDEX_ILG); - ilg_fn = ilg; - } - if ((ilg_fp = OPEN_OUT(ilg_fn)) == NULL) - FATAL("Can't create transcript file %s.\n", ilg_fn); - - if (log_given) { -- sprintf(log_fn, "%s%s", base, INDEX_LOG); -+ snprintf(log_fn, sizeof(log_fn), "%s%s", base, INDEX_LOG); - if ((log_fp = OPEN_IN(log_fn)) == NULL) { - FATAL("Source log file %s not found.\n", log_fn); - } else { -@@ -505,6 +507,9 @@ - if ((found = kpse_find_file (fn, kpse_ist_format, 1)) == NULL) { - FATAL("Index style file %s not found.\n", fn); - } else { -+ if (strlen(found) >= sizeof(sty_fn)) { -+ FATAL("Style file %s too long.\n", found); -+ } - strcpy(sty_fn,found); - if ((sty_fp = OPEN_IN(sty_fn)) == NULL) { - FATAL("Could not open style file %s.\n", sty_fn); -@@ -512,6 +517,9 @@ - } - #else - if ((path = getenv(STYLE_PATH)) == NULL) { -+ if (strlen(fn) >= sizeof(sty_fn)) { -+ FATAL("Style file %s too long.\n", fn); -+ } - /* style input path not defined */ - strcpy(sty_fn, fn); - sty_fp = OPEN_IN(sty_fn); diff --git a/app-text/texlive-core/files/2007/tetex-3.0_p1-xpdf-CVE-2007-3387.patch b/app-text/texlive-core/files/2007/tetex-3.0_p1-xpdf-CVE-2007-3387.patch deleted file mode 100644 index da3c7a6d19f7..000000000000 --- a/app-text/texlive-core/files/2007/tetex-3.0_p1-xpdf-CVE-2007-3387.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- tetex-src-3.0/libs/xpdf/xpdf/Stream.cc Tue Feb 27 14:05:52 2007 -+++ tetex-src-3.0/libs/xpdf/xpdf/Stream.cc Thu Jul 12 15:55:49 2007 -@@ -421,7 +421,12 @@ - } - pixBytes = (nComps * nBits + 7) >> 3; - rowBytes = ((totalBits + 7) >> 3) + pixBytes; -- if (rowBytes < 0) { -+ if (width <= 0 || nComps <= 0 || nBits <= 0 || -+ nComps > gfxColorMaxComps || -+ nBits > 16 || -+ nVals <= 0 || -+ nVals * nBits + 7 <= 0 || -+ rowBytes <= 0) { - return; - } - predLine = (Guchar *)gmalloc(rowBytes); diff --git a/app-text/texlive-core/files/2007/texlive-core-2007-bump_makeindex_limitations.patch b/app-text/texlive-core/files/2007/texlive-core-2007-bump_makeindex_limitations.patch deleted file mode 100644 index 7f6fed22f7c3..000000000000 --- a/app-text/texlive-core/files/2007/texlive-core-2007-bump_makeindex_limitations.patch +++ /dev/null @@ -1,33 +0,0 @@ -2007-11-20 Karl Berry - - * mkind.c (sty_fn): use STRING_MAX, not LINE_MAX. - From Peter Ansell, 19 Nov 2007 10:11:40. - - * mkind.h (STRING_MAX): bump again to 999. - -Index: source/texk/makeindexk/mkind.c -=================================================================== ---- source/texk/makeindexk/mkind.c (revision 5516) -+++ source/texk/makeindexk/mkind.c (revision 5517) -@@ -53,7 +53,7 @@ - FILE *ilg_fp; - - char *pgm_fn; --char sty_fn[LINE_MAX]; -+char sty_fn[STRING_MAX]; - char *idx_fn; - char ind[STRING_MAX]; - char *ind_fn; -Index: source/texk/makeindexk/mkind.h -=================================================================== ---- source/texk/makeindexk/mkind.h (revision 5516) -+++ source/texk/makeindexk/mkind.h (revision 5517) -@@ -337,7 +337,7 @@ - #define ROMAN_MAX 16 /* maximum length of Roman page number */ - /* field */ - --#define STRING_MAX 256 /* maximum length of host filename */ -+#define STRING_MAX 999 /* maximum length of host filename */ - - /*====================================================================*/ - diff --git a/app-text/texlive-core/files/2007/texlive-core-2007-dvips_bufferoverflow.patch b/app-text/texlive-core/files/2007/texlive-core-2007-dvips_bufferoverflow.patch deleted file mode 100644 index 3f4732f1a249..000000000000 --- a/app-text/texlive-core/files/2007/texlive-core-2007-dvips_bufferoverflow.patch +++ /dev/null @@ -1,87 +0,0 @@ -hps.c (stamp_external, stamp_hps): protext against long strings. - From Bastien Roucaries via Norbert, 21 Oct 2007 13:22:19, - Debian bug 447081. - -Index: texk/dvipsk/hps.c -=================================================================== ---- texk/dvipsk/hps.c (revision 5253) -+++ texk/dvipsk/hps.c (revision 5254) -@@ -441,20 +441,29 @@ - - void stamp_hps P1C(Hps_link *, pl) - { -- char tmpbuf[200] ; -+ char * tmpbuf; - if (pl == NULL) { -- error("Null pointer, oh no!") ; -+ error("stamp_hps: null pl pointer, oh no!") ; - return ; -- } else { -- /* print out the proper pdfm with local page info only -- * target info will be in the target dictionary */ -- (void)sprintf(tmpbuf, -- " (%s) [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] pdfm ", pl->title, pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury, -- pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4], -- pl->color[0], pl->color[1], pl->color[2]) ; -- cmdout(tmpbuf) ; -- } -+ } -+ if(pl->title == NULL) { -+ error("stamp_hps: null pl->title pointer, oh no!") ; -+ return ; -+ } -+ -+ tmpbuf = (char *) xmalloc(strlen(pl->title)+200); -+ -+ /* print out the proper pdfm with local page info only -+ * target info will be in the target dictionary */ -+ (void)sprintf(tmpbuf, -+ " (%s) [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] pdfm ", -+ pl->title, pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury, -+ pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4], -+ pl->color[0], pl->color[1], pl->color[2]) ; -+ cmdout(tmpbuf) ; -+ free(tmpbuf); - -+ - } - - /* For external URL's, we just pass them through as a string. The hyperps -@@ -462,18 +471,27 @@ - */ - void stamp_external P2C(char *, s, Hps_link *, pl) - { -- char tmpbuf[200]; -+ char *tmpbuf; - if (pl == NULL) { -- error("Null pointer, oh no!") ; -+ error("stamp_external: null pl pointer, oh no!") ; - return ; -- } else { -- /* print out the proper pdfm with local page info only -- * target info will be in the target dictionary */ -- (void)sprintf(tmpbuf," [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] (%s) pdfm ", pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury, -- pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4], -- pl->color[0], pl->color[1], pl->color[2], s) ; -- cmdout(tmpbuf) ; -- } -+ } -+ -+ if (s == NULL) { -+ error("stamp_external: null s pointer, oh no!") ; -+ return ; -+ } -+ -+ tmpbuf = (char *) xmalloc(strlen(s) + 200); -+ -+ /* print out the proper pdfm with local page info only -+ * target info will be in the target dictionary */ -+ (void)sprintf(tmpbuf," [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] (%s) pdfm ", -+ pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury, -+ pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4], -+ pl->color[0], pl->color[1], pl->color[2], s) ; -+ cmdout(tmpbuf) ; -+ free(tmpbuf); - } - - void finish_hps P1H(void) { diff --git a/app-text/texlive-core/files/2007/texlive-core-2007-icu-xetex-execstacks.patch b/app-text/texlive-core/files/2007/texlive-core-2007-icu-xetex-execstacks.patch deleted file mode 100644 index c84238532dbe..000000000000 --- a/app-text/texlive-core/files/2007/texlive-core-2007-icu-xetex-execstacks.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: work/libs/icu-xetex/tools/genccode/genccode.c -=================================================================== ---- work.orig/libs/icu-xetex/tools/genccode/genccode.c -+++ work/libs/icu-xetex/tools/genccode/genccode.c -@@ -149,6 +149,7 @@ static const struct AssemblyType { - } assemblyHeader[] = { - {"gcc", - ".globl %s\n" -+ "\t.section .note.GNU-stack,\"\",@progbits\n" - "\t.section .rodata\n" - "\t.align 8\n" /* Either align 8 bytes or 2^8 (256) bytes. 8 bytes is needed. */ - "\t.type %s,@object\n" diff --git a/app-text/texlive-core/files/2007/texlive-core-2007-libteckit-asneeded.patch b/app-text/texlive-core/files/2007/texlive-core-2007-libteckit-asneeded.patch deleted file mode 100644 index f1215b6bd378..000000000000 --- a/app-text/texlive-core/files/2007/texlive-core-2007-libteckit-asneeded.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: work/libs/teckit/lib/Makefile.am -=================================================================== ---- work.orig/libs/teckit/lib/Makefile.am -+++ work/libs/teckit/lib/Makefile.am -@@ -10,5 +10,8 @@ AM_CFLAGS = $(AM_CPPFLAGS) - - lib_LTLIBRARIES = libTECkit_Compiler.la libTECkit.la - -+libTECkit_Compiler_la_LIBADD = @LDZLIB@ -+libTECkit_la_LIBADD = @LDZLIB@ -+ - include ../source/Makefile.am - diff --git a/app-text/texlive-core/files/2007/texlive-core-2007-mpware.patch b/app-text/texlive-core/files/2007/texlive-core-2007-mpware.patch deleted file mode 100644 index d3cbebcab8f7..000000000000 --- a/app-text/texlive-core/files/2007/texlive-core-2007-mpware.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- TeX.orig/texk/web2c/mpware/Makefile.in 2007-05-26 20:40:14.000000000 +0200 -+++ TeX/texk/web2c/mpware/Makefile.in 2007-05-26 20:40:57.000000000 +0200 -@@ -49,7 +49,7 @@ - $(INSTALL_PROGRAM) newer $(bindir)/newer - $(INSTALL_LIBTOOL_PROG) dmp $(bindir) - $(INSTALL_LIBTOOL_PROG) mpto $(bindir) -- $(INSTALL_SCRIPT) makempx $(scriptdir)/makempx -+ $(INSTALL_LIBTOOL_PROG) makempx $(bindir) - install-data: - - kpse_include ../make/tkpathsea.mk diff --git a/app-text/texlive-core/files/2007/xpdf-3.02pl2.patch b/app-text/texlive-core/files/2007/xpdf-3.02pl2.patch deleted file mode 100644 index 1d962f328a02..000000000000 --- a/app-text/texlive-core/files/2007/xpdf-3.02pl2.patch +++ /dev/null @@ -1,640 +0,0 @@ -Index: tetex-src-3.0/libs/xpdf/xpdf/Stream.cc -=================================================================== ---- tetex-src-3.0.orig/libs/xpdf/xpdf/Stream.cc -+++ tetex-src-3.0/libs/xpdf/xpdf/Stream.cc -@@ -1285,19 +1285,24 @@ CCITTFaxStream::CCITTFaxStream(Stream *s - error (-1, "invalid number of columns: %d\n", columns); - exit (1); - } -+ else if (columns > INT_MAX - 2) columns = INT_MAX - 2; - rows = rowsA; - endOfBlock = endOfBlockA; - black = blackA; -- refLine = (short *)gmallocn(columns + 4, sizeof(short)); -- codingLine = (short *)gmallocn(columns + 3, sizeof(short)); -+ // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = columns -+ // ---> max codingLine size = columns + 1 -+ // refLine has one extra guard entry at the end -+ // ---> max refLine size = columns + 2 -+ codingLine = (int *)gmallocn(columns + 1, sizeof(int)); -+ refLine = (int *)gmallocn(columns + 2, sizeof(int)); - - eof = gFalse; - row = 0; - nextLine2D = encoding < 0; - inputBits = 0; -- codingLine[0] = 0; -- codingLine[1] = refLine[2] = columns; -- a0 = 1; -+ codingLine[0] = columns; -+ a0i = 0; -+ outputBits = 0; - - buf = EOF; - } -@@ -1316,9 +1321,9 @@ void CCITTFaxStream::reset() { - row = 0; - nextLine2D = encoding < 0; - inputBits = 0; -- codingLine[0] = 0; -- codingLine[1] = refLine[2] = columns; -- a0 = 1; -+ codingLine[0] = columns; -+ a0i = 0; -+ outputBits = 0; - buf = EOF; - - // skip any initial zero bits and end-of-line marker, and get the 2D -@@ -1335,164 +1340,228 @@ void CCITTFaxStream::reset() { - } - } - -+inline void CCITTFaxStream::addPixels(int a1, int blackPixels) { -+ if (a1 > codingLine[a0i]) { -+ if (a1 > columns) { -+ error(getPos(), "CCITTFax row is wrong length (%d)", a1); -+ err = gTrue; -+ a1 = columns; -+ } -+ if ((a0i & 1) ^ blackPixels) { -+ ++a0i; -+ } -+ codingLine[a0i] = a1; -+ } -+} -+ -+inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) { -+ if (a1 > codingLine[a0i]) { -+ if (a1 > columns) { -+ error(getPos(), "CCITTFax row is wrong length (%d)", a1); -+ err = gTrue; -+ a1 = columns; -+ } -+ if ((a0i & 1) ^ blackPixels) { -+ ++a0i; -+ } -+ codingLine[a0i] = a1; -+ } else if (a1 < codingLine[a0i]) { -+ if (a1 < 0) { -+ error(getPos(), "Invalid CCITTFax code"); -+ err = gTrue; -+ a1 = 0; -+ } -+ while (a0i > 0 && a1 <= codingLine[a0i - 1]) { -+ --a0i; -+ } -+ codingLine[a0i] = a1; -+ } -+} -+ - int CCITTFaxStream::lookChar() { - short code1, code2, code3; -- int a0New; -- GBool err, gotEOL; -- int ret; -- int bits, i; -- -- // if at eof just return EOF -- if (eof && codingLine[a0] >= columns) { -- return EOF; -+ int b1i, blackPixels, i, bits; -+ GBool gotEOL; -+ -+ if (buf != EOF) { -+ return buf; - } - - // read the next row -- err = gFalse; -- if (codingLine[a0] >= columns) { -+ if (outputBits == 0) { - -+ // if at eof just return EOF -+ if (eof) { -+ return EOF; -+ } -+ -+ err = gFalse; -+ - // 2-D encoding - if (nextLine2D) { - for (i = 0; codingLine[i] < columns; ++i) - refLine[i] = codingLine[i]; -- refLine[i] = refLine[i + 1] = columns; -- b1 = 1; -- a0New = codingLine[a0 = 0] = 0; -- do { -- code1 = getTwoDimCode(); -+ refLine[i++] = columns; -+ refLine[i] = columns; -+ codingLine[0] = 0; -+ a0i = 0; -+ b1i = 0; -+ blackPixels = 0; -+ // invariant: -+ // refLine[b1i-1] <= codingLine[a0i] < refLine[b1i] < refLine[b1i+1] -+ // <= columns -+ // exception at left edge: -+ // codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible -+ // exception at right edge: -+ // refLine[b1i] = refLine[b1i+1] = columns is possible -+ while (codingLine[a0i] < columns) { -+ code1 = getTwoDimCode(); - switch (code1) { -- case twoDimPass: -- if (refLine[b1] < columns) { -- a0New = refLine[b1 + 1]; -- b1 += 2; -- } -- break; -- case twoDimHoriz: -- if ((a0 & 1) == 0) { -- code1 = code2 = 0; -- do { -- code1 += code3 = getWhiteCode(); -- } while (code3 >= 64); -- do { -- code2 += code3 = getBlackCode(); -- } while (code3 >= 64); -- } else { -- code1 = code2 = 0; -- do { -- code1 += code3 = getBlackCode(); -- } while (code3 >= 64); -- do { -- code2 += code3 = getWhiteCode(); -- } while (code3 >= 64); -- } -- if (code1 > 0 || code2 > 0) { -- codingLine[a0 + 1] = a0New + code1; -- ++a0; -- a0New = codingLine[a0 + 1] = codingLine[a0] + code2; -- ++a0; -- while (refLine[b1] <= codingLine[a0] && refLine[b1] < columns) -- b1 += 2; -- } -- break; -- case twoDimVert0: -- a0New = codingLine[++a0] = refLine[b1]; -- if (refLine[b1] < columns) { -- ++b1; -- while (refLine[b1] <= codingLine[a0] && refLine[b1] < columns) -- b1 += 2; -- } -- break; -- case twoDimVertR1: -- a0New = codingLine[++a0] = refLine[b1] + 1; -- if (refLine[b1] < columns) { -- ++b1; -- while (refLine[b1] <= codingLine[a0] && refLine[b1] < columns) -- b1 += 2; -- } -- break; -- case twoDimVertL1: -- if (a0 == 0 || refLine[b1] - 1 > a0New) { -- a0New = codingLine[++a0] = refLine[b1] - 1; -- --b1; -- while (refLine[b1] <= codingLine[a0] && refLine[b1] < columns) -- b1 += 2; -- } -- break; -- case twoDimVertR2: -- a0New = codingLine[++a0] = refLine[b1] + 2; -- if (refLine[b1] < columns) { -- ++b1; -- while (refLine[b1] <= codingLine[a0] && refLine[b1] < columns) -- b1 += 2; -- } -- break; -- case twoDimVertL2: -- if (a0 == 0 || refLine[b1] - 2 > a0New) { -- a0New = codingLine[++a0] = refLine[b1] - 2; -- --b1; -- while (refLine[b1] <= codingLine[a0] && refLine[b1] < columns) -- b1 += 2; -- } -- break; -- case twoDimVertR3: -- a0New = codingLine[++a0] = refLine[b1] + 3; -- if (refLine[b1] < columns) { -- ++b1; -- while (refLine[b1] <= codingLine[a0] && refLine[b1] < columns) -- b1 += 2; -- } -- break; -- case twoDimVertL3: -- if (a0 == 0 || refLine[b1] - 3 > a0New) { -- a0New = codingLine[++a0] = refLine[b1] - 3; -- --b1; -- while (refLine[b1] <= codingLine[a0] && refLine[b1] < columns) -- b1 += 2; -- } -- break; -- case EOF: -- eof = gTrue; -- codingLine[a0 = 0] = columns; -- return EOF; -- default: -- error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1); -- err = gTrue; -- break; -+ case twoDimPass: -+ addPixels(refLine[b1i + 1], blackPixels); -+ if (refLine[b1i + 1] < columns) { -+ b1i += 2; -+ } -+ break; -+ case twoDimHoriz: -+ code1 = code2 = 0; -+ if (blackPixels) { -+ do { -+ code1 += code3 = getBlackCode(); -+ } while (code3 >= 64); -+ do { -+ code2 += code3 = getWhiteCode(); -+ } while (code3 >= 64); -+ } else { -+ do { -+ code1 += code3 = getWhiteCode(); -+ } while (code3 >= 64); -+ do { -+ code2 += code3 = getBlackCode(); -+ } while (code3 >= 64); -+ } -+ addPixels(codingLine[a0i] + code1, blackPixels); -+ if (codingLine[a0i] < columns) { -+ addPixels(codingLine[a0i] + code2, blackPixels ^ 1); -+ } -+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { -+ b1i += 2; -+ } -+ break; -+ case twoDimVertR3: -+ addPixels(refLine[b1i] + 3, blackPixels); -+ blackPixels ^= 1; -+ if (codingLine[a0i] < columns) { -+ ++b1i; -+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { -+ b1i += 2; -+ } -+ } -+ break; -+ case twoDimVertR2: -+ addPixels(refLine[b1i] + 2, blackPixels); -+ blackPixels ^= 1; -+ if (codingLine[a0i] < columns) { -+ ++b1i; -+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { -+ b1i += 2; -+ } -+ } -+ break; -+ case twoDimVertR1: -+ addPixels(refLine[b1i] + 1, blackPixels); -+ blackPixels ^= 1; -+ if (codingLine[a0i] < columns) { -+ ++b1i; -+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { -+ b1i += 2; -+ } -+ } -+ break; -+ case twoDimVert0: -+ addPixels(refLine[b1i], blackPixels); -+ blackPixels ^= 1; -+ if (codingLine[a0i] < columns) { -+ ++b1i; -+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { -+ b1i += 2; -+ } -+ } -+ break; -+ case twoDimVertL3: -+ addPixelsNeg(refLine[b1i] - 3, blackPixels); -+ blackPixels ^= 1; -+ if (codingLine[a0i] < columns) { -+ if (b1i > 0) { -+ --b1i; -+ } else { -+ ++b1i; -+ } -+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { -+ b1i += 2; -+ } -+ } -+ break; -+ case twoDimVertL2: -+ addPixelsNeg(refLine[b1i] - 2, blackPixels); -+ blackPixels ^= 1; -+ if (codingLine[a0i] < columns) { -+ if (b1i > 0) { -+ --b1i; -+ } else { -+ ++b1i; -+ } -+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { -+ b1i += 2; -+ } -+ } -+ break; -+ case twoDimVertL1: -+ addPixelsNeg(refLine[b1i] - 1, blackPixels); -+ blackPixels ^= 1; -+ if (codingLine[a0i] < columns) { -+ if (b1i > 0) { -+ --b1i; -+ } else { -+ ++b1i; -+ } -+ while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { -+ b1i += 2; -+ } -+ } -+ break; -+ case EOF: -+ addPixels(columns, 0); -+ eof = gTrue; -+ break; -+ default: -+ error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1); -+ addPixels(columns, 0); -+ err = gTrue; -+ break; -+ } - } -- } while (codingLine[a0] < columns); - - // 1-D encoding - } else { -- codingLine[a0 = 0] = 0; -- while (1) { -- code1 = 0; -- do { -- code1 += code3 = getWhiteCode(); -- } while (code3 >= 64); -- codingLine[a0+1] = codingLine[a0] + code1; -- ++a0; -- if (codingLine[a0] >= columns) -- break; -- code2 = 0; -- do { -- code2 += code3 = getBlackCode(); -- } while (code3 >= 64); -- codingLine[a0+1] = codingLine[a0] + code2; -- ++a0; -- if (codingLine[a0] >= columns) -- break; -- } -- } -- -- if (codingLine[a0] != columns) { -- error(getPos(), "CCITTFax row is wrong length (%d)", codingLine[a0]); -- // force the row to be the correct length -- while (codingLine[a0] > columns) { -- --a0; -+ codingLine[0] = 0; -+ a0i = 0; -+ blackPixels = 0; -+ while (codingLine[a0i] < columns) { -+ code1 = 0; -+ if (blackPixels) { -+ do { -+ code1 += code3 = getBlackCode(); -+ } while (code3 >= 64); -+ } else { -+ do { -+ code1 += code3 = getWhiteCode(); -+ } while (code3 >= 64); -+ } -+ addPixels(codingLine[a0i] + code1, blackPixels); -+ blackPixels ^= 1; -+ } - } -- codingLine[++a0] = columns; -- err = gTrue; -- } - - // byte-align the row - if (byteAlign) { -@@ -1552,14 +1621,17 @@ int CCITTFaxStream::lookChar() { - // this if we know the stream contains end-of-line markers because - // the "just plow on" technique tends to work better otherwise - } else if (err && endOfLine) { -- do { -+ while (1) { -+ code1 = lookBits(13); - if (code1 == EOF) { - eof = gTrue; - return EOF; - } -+ if ((code1 >> 1) == 0x001) { -+ break; -+ } - eatBits(1); -- code1 = lookBits(13); -- } while ((code1 >> 1) != 0x001); -+ } - eatBits(12); - if (encoding > 0) { - eatBits(1); -@@ -1567,11 +1639,11 @@ int CCITTFaxStream::lookChar() { - } - } - -- a0 = 0; -- outputBits = codingLine[1] - codingLine[0]; -- if (outputBits == 0) { -- a0 = 1; -- outputBits = codingLine[2] - codingLine[1]; -+ // set up for output -+ if (codingLine[0] > 0) { -+ outputBits = codingLine[a0i = 0]; -+ } else { -+ outputBits = codingLine[a0i = 1]; - } - - ++row; -@@ -1579,39 +1651,43 @@ int CCITTFaxStream::lookChar() { - - // get a byte - if (outputBits >= 8) { -- ret = ((a0 & 1) == 0) ? 0xff : 0x00; -- if ((outputBits -= 8) == 0) { -- ++a0; -- if (codingLine[a0] < columns) { -- outputBits = codingLine[a0 + 1] - codingLine[a0]; -- } -+ buf = (a0i & 1) ? 0x00 : 0xff; -+ outputBits -= 8; -+ if (outputBits == 0 && codingLine[a0i] < columns) { -+ ++a0i; -+ outputBits = codingLine[a0i] - codingLine[a0i - 1]; - } - } else { - bits = 8; -- ret = 0; -+ buf = 0; - do { - if (outputBits > bits) { -- i = bits; -- bits = 0; -- if ((a0 & 1) == 0) { -- ret |= 0xff >> (8 - i); -+ buf <<= bits; -+ if (!(a0i & 1)) { -+ buf |= 0xff >> (8 - bits); - } -- outputBits -= i; -+ outputBits -= bits; -+ bits = 0; - } else { -- i = outputBits; -- bits -= outputBits; -- if ((a0 & 1) == 0) { -- ret |= (0xff >> (8 - i)) << bits; -+ buf <<= outputBits; -+ if (!(a0i & 1)) { -+ buf |= 0xff >> (8 - outputBits); - } -+ bits -= outputBits; - outputBits = 0; -- ++a0; -- if (codingLine[a0] < columns) { -- outputBits = codingLine[a0 + 1] - codingLine[a0]; -+ if (codingLine[a0i] < columns) { -+ ++a0i; -+ outputBits = codingLine[a0i] - codingLine[a0i - 1]; -+ } else if (bits > 0) { -+ buf <<= bits; -+ bits = 0; - } - } -- } while (bits > 0 && codingLine[a0] < columns); -+ } while (bits); -+ } -+ if (black) { -+ buf ^= 0xff; - } -- buf = black ? (ret ^ 0xff) : ret; - return buf; - } - -@@ -1653,6 +1729,9 @@ short CCITTFaxStream::getWhiteCode() { - code = 0; // make gcc happy - if (endOfBlock) { - code = lookBits(12); -+ if (code == EOF) { -+ return 1; -+ } - if ((code >> 5) == 0) { - p = &whiteTab1[code]; - } else { -@@ -1665,6 +1744,9 @@ short CCITTFaxStream::getWhiteCode() { - } else { - for (n = 1; n <= 9; ++n) { - code = lookBits(n); -+ if (code == EOF) { -+ return 1; -+ } - if (n < 9) { - code <<= 9 - n; - } -@@ -1676,6 +1758,9 @@ short CCITTFaxStream::getWhiteCode() { - } - for (n = 11; n <= 12; ++n) { - code = lookBits(n); -+ if (code == EOF) { -+ return 1; -+ } - if (n < 12) { - code <<= 12 - n; - } -@@ -1701,6 +1786,9 @@ short CCITTFaxStream::getBlackCode() { - code = 0; // make gcc happy - if (endOfBlock) { - code = lookBits(13); -+ if (code == EOF) { -+ return 1; -+ } - if ((code >> 7) == 0) { - p = &blackTab1[code]; - } else if ((code >> 9) == 0) { -@@ -1715,6 +1803,9 @@ short CCITTFaxStream::getBlackCode() { - } else { - for (n = 2; n <= 6; ++n) { - code = lookBits(n); -+ if (code == EOF) { -+ return 1; -+ } - if (n < 6) { - code <<= 6 - n; - } -@@ -1726,6 +1817,9 @@ short CCITTFaxStream::getBlackCode() { - } - for (n = 7; n <= 12; ++n) { - code = lookBits(n); -+ if (code == EOF) { -+ return 1; -+ } - if (n < 12) { - code <<= 12 - n; - } -@@ -1739,6 +1833,9 @@ short CCITTFaxStream::getBlackCode() { - } - for (n = 10; n <= 13; ++n) { - code = lookBits(n); -+ if (code == EOF) { -+ return 1; -+ } - if (n < 13) { - code <<= 13 - n; - } -@@ -1961,6 +2058,12 @@ void DCTStream::reset() { - // allocate a buffer for the whole image - bufWidth = ((width + mcuWidth - 1) / mcuWidth) * mcuWidth; - bufHeight = ((height + mcuHeight - 1) / mcuHeight) * mcuHeight; -+ if (bufWidth <= 0 || bufHeight <= 0 || -+ bufWidth > INT_MAX / bufWidth / (int)sizeof(int)) { -+ error(getPos(), "Invalid image size in DCT stream"); -+ y = height; -+ return; -+ } - for (i = 0; i < numComps; ++i) { - frameBuf[i] = (int *)gmallocn(bufWidth * bufHeight, sizeof(int)); - memset(frameBuf[i], 0, bufWidth * bufHeight * sizeof(int)); -@@ -3024,6 +3127,11 @@ GBool DCTStream::readScanInfo() { - } - scanInfo.firstCoeff = str->getChar(); - scanInfo.lastCoeff = str->getChar(); -+ if (scanInfo.firstCoeff < 0 || scanInfo.lastCoeff > 63 || -+ scanInfo.firstCoeff > scanInfo.lastCoeff) { -+ error(getPos(), "Bad DCT coefficient numbers in scan info block"); -+ return gFalse; -+ } - c = str->getChar(); - scanInfo.ah = (c >> 4) & 0x0f; - scanInfo.al = c & 0x0f; -Index: tetex-src-3.0/libs/xpdf/xpdf/Stream.h -=================================================================== ---- tetex-src-3.0.orig/libs/xpdf/xpdf/Stream.h -+++ tetex-src-3.0/libs/xpdf/xpdf/Stream.h -@@ -519,13 +519,15 @@ private: - int row; // current row - int inputBuf; // input buffer - int inputBits; // number of bits in input buffer -- short *refLine; // reference line changing elements -- int b1; // index into refLine -- short *codingLine; // coding line changing elements -- int a0; // index into codingLine -+ int *codingLine; // coding line changing elements -+ int *refLine; // reference line changing elements -+ int a0i; // index into codingLine -+ GBool err; // error on current line - int outputBits; // remaining ouput bits - int buf; // character buffer - -+ void addPixels(int a1, int black); -+ void addPixelsNeg(int a1, int black); - short getTwoDimCode(); - short getWhiteCode(); - short getBlackCode(); diff --git a/app-text/texlive-core/files/digest-texlive-core-2007-r8 b/app-text/texlive-core/files/digest-texlive-core-2007-r8 index 5c20835cdcb8..b5eb1ede838c 100644 --- a/app-text/texlive-core/files/digest-texlive-core-2007-r8 +++ b/app-text/texlive-core/files/digest-texlive-core-2007-r8 @@ -1,12 +1,12 @@ -MD5 195188f2a025ff8e4ccd00f7c73ab0fe texlive-core-2007-dviljk-security-fixes.patch.bz2 10647 -RMD160 6581361038be07139a79d2fa301d47b6e6bfd560 texlive-core-2007-dviljk-security-fixes.patch.bz2 10647 -SHA256 70fe7b2f87c7850fb2eef95cebcc8b03541d8907ce216b207f5d0f45cc4d7d1f texlive-core-2007-dviljk-security-fixes.patch.bz2 10647 MD5 9b6348b8f54a9e94e8b6b50b821fcdc3 texlive-core-2007-updated-config.ps.bz2 2981 RMD160 af88bbda9227e718ebf69d007f424c8b985a0404 texlive-core-2007-updated-config.ps.bz2 2981 SHA256 ff12f1f6a68e45ad8d8f960f5fe76aae159d64074507a4a650973e1e865c8acd texlive-core-2007-updated-config.ps.bz2 2981 MD5 d539b5a6b9f96cc2616f09f4543394c8 texlive-core-2007.tar.bz2 31078286 RMD160 496cb3fa3c5cd9b2ea5da3b0bced67a2b5afe7b9 texlive-core-2007.tar.bz2 31078286 SHA256 96c12147ea9717539553eb6b3be52c2df6163ca617dccc71282ccd39c2e5773b texlive-core-2007.tar.bz2 31078286 +MD5 a4fd38982d0b991cb53c99cba91c7ba4 texlive-core-patches-1.tar.bz2 17159 +RMD160 38f401727619714fbbf310d822702ce9f0c4afed texlive-core-patches-1.tar.bz2 17159 +SHA256 65e37bfa985f5faa3b8ef86fea29e6e1326bff53c795dd6d423df9ad6a790f4a texlive-core-patches-1.tar.bz2 17159 MD5 04850af5320c53804353a072f6b0ff30 texlive-module-bin-afm2pl-2007.zip 25453 RMD160 af1597b5ed9ed7bc9766139e3434f5e42b483087 texlive-module-bin-afm2pl-2007.zip 25453 SHA256 9efc5a4306a43bf36d9c84ef05d213fcf1d62354b8403eddaf3e4e699a297d31 texlive-module-bin-afm2pl-2007.zip 25453 diff --git a/app-text/texlive-core/texlive-core-2007-r8.ebuild b/app-text/texlive-core/texlive-core-2007-r8.ebuild index 5e42460910ff..bb509963200b 100644 --- a/app-text/texlive-core/texlive-core-2007-r8.ebuild +++ b/app-text/texlive-core/texlive-core-2007-r8.ebuild @@ -1,9 +1,11 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/texlive-core-2007-r8.ebuild,v 1.2 2007/11/21 20:45:39 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/texlive-core/texlive-core-2007-r8.ebuild,v 1.3 2007/12/02 22:35:21 aballier Exp $ inherit eutils flag-o-matic toolchain-funcs libtool autotools texlive-common +PATCHLEVEL="1" + DESCRIPTION="A complete TeX distribution" HOMEPAGE="http://tug.org/texlive/" SLOT="0" @@ -19,8 +21,7 @@ TEXLIVE_CORE_EXTRA_BUILT_BINARIES="bin-xetex bin-aleph bin-omega" TEXLIVE_CORE_INCLUDED_TEXMF="${TEXLIVE_BASICBIN_CONTENTS} ${TEXLIVE_FONTBIN_CONTENTS} ${TEXLIVE_BINEXTRA_CONTENTS} ${TEXLIVE_CORE_EXTRA_BUILT_BINARIES}" -SRC_URI="mirror://gentoo/${P}.tar.bz2 - mirror://gentoo/${P}-dviljk-security-fixes.patch.bz2" +SRC_URI="mirror://gentoo/${P}.tar.bz2" for i in ${TEXLIVE_CORE_INCLUDED_TEXMF}; do SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.zip" @@ -30,6 +31,9 @@ done # Or alternatively: http://tug.org/texlive/bugs.html SRC_URI="${SRC_URI} mirror://gentoo/${P}-updated-config.ps.bz2" +# Fetch patches +SRC_URI="${SRC_URI} mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~ia64 ~ppc64 ~sparc ~x86" IUSE="X doc" @@ -67,31 +71,7 @@ src_unpack() { unpack ${A} cd "${S}" - epatch "${FILESDIR}/${PV}/${P}-mpware.patch" - epatch "${FILESDIR}/${PV}/${P}-libteckit-asneeded.patch" - -# it is also affected by bug 170861 - epatch "${FILESDIR}/${PV}/tetex-3.0-CVE-2007-0650.patch" - -# Bug #188172 and bug #185225 - epatch "${FILESDIR}/${PV}/tetex-3.0_p1-xpdf-CVE-2007-3387.patch" - -# Do not require exec stacks for asm generated by icu genccode program -# it would be better to use system icu... but it doesn't seem that well -# supported - epatch "${FILESDIR}/${PV}/${P}-icu-xetex-execstacks.patch" - -# See http://permalink.gmane.org/gmane.comp.tex.live/14939 - epatch "${FILESDIR}/${PV}/${P}-dvips_bufferoverflow.patch" - -# dviljk buffer overflow issues, bug #198229 - epatch "${WORKDIR}/${P}-dviljk-security-fixes.patch" - -# Bump makeindex limitations, bug #199590, patch by Peter Ansell - epatch "${FILESDIR}/${PV}/${P}-bump_makeindex_limitations.patch" - -# security bug #196735 - epatch "${FILESDIR}/${PV}/xpdf-3.02pl2.patch" + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" sed -i -e "/mktexlsr/,+3d" -e "s/\(updmap-sys\)/\1 --nohash/" \ Makefile.in || die "sed failed" -- cgit v1.2.3-65-gdbad