Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=156f24c81f7039f59c749f9d156c1eb7b08c4b0f
commit 156f24c81f7039f59c749f9d156c1eb7b08c4b0f Author: Elentir <[email protected]> Date: Thu Sep 23 18:08:05 2010 +0200 tetex-3.0-20-i686 * remove package, replaced by texlive diff --git a/source/xapps-extra/tetex/FrugalBuild b/source/xapps-extra/tetex/FrugalBuild deleted file mode 100644 index 9fc2f9a..0000000 --- a/source/xapps-extra/tetex/FrugalBuild +++ /dev/null @@ -1,93 +0,0 @@ -# Compiling Time: 2.54 SBU -# Maintainer: Zsolt Szalai <[email protected]> -# Modified by: Christian Hamar alias krix <[email protected]> - -pkgname=tetex -pkgver=3.0 -pkgrel=20 -pkgdesc="teTeX is a complete TeX distribution for UNIX compatible systems - base files, libraries, fonts" -url="http://www.tug.org/teTeX/" -depends=('libstdc++' 'libxp>=1.0.0-3' 'libxmu' 'libxft' 'libxpm' 'freetype2' 'fontconfig' 'expat' 'openmotif>=2.3.0' 'zlib' 'gd>=2.0.35-2' 'tetex-kpathsea' 't1lib') -makedepends=('bison' 'flex' 'ncurses') -groups=('xapps-extra') -archs=('i686' 'x86_64' 'ppc') -up2date="lynx --dump 'ftp://dante.ctan.org/tex-archive/systems/unix/teTeX/current/distrib/'|grep \"tar.gz\" |sed -e 's/.*tetex-src-\(.*\).tar.*/\1/;q'" -source=(ftp://dante.ctan.org/tex-archive/obsolete/systems/unix/teTeX/3.0/distrib/tetex-{texmf,src}-$pkgver.tar.gz \ - tetex-3.0-CVE-2005-3193.patch tetex-3.0-CVE-2007-0650.patch tetex-3.0-CVE-2007-3387.patch \ - tetex-3.0-CVE-2007-5935.patch tetex-3.0-CVE-2007-5936+5937.patch glibc210.diff \ - texlive-CVE-2010-0739-int-overflow.patch tetex-png-1.4.patch) -sha1sums=('1be97f57a26a6e9b72ebfd932e45914a959aff16' \ - '7637789f7f4929694aed1b89820f5bad4753e8fc' \ - '4a275b1d9a211e94bc13286d05ef619cdf873770' \ - '28208eb13f493c1c9c6538f254f04fc0c2aaff1e' \ - '3ad00a8f16dd16acc765953e10dc68f181e0a156' \ - 'f97712ef399a53c39c762883febc8c61d9ed3d46' \ - '5bc76c08516bd3edc2b1bd23b743946b790b1e7e' \ - 'f675bcfa254bad6fb0262cd06e92c21631a097aa' \ - 'b6b4712edbb89cdca22658a596ff2de7a90d864b' \ - '1642ec5a590e9a803f5d8b1651b0e6c3be64d33f') -backup=('/usr/share/texmf/web2c/texmf.cnf') -removes=('/usr/share/texmf/web2c/latex.fmt' '/usr/share/texmf/web2c/latex.log') -conflicts=('xdvik') -NOEXTRACT=1 # important, src not tared as a single directory - -build() { - [ "$CARCH" == "x86_64" ] && CFLAGS="$CFLAGS -fPIC -DPIC" - cd $Fsrcdir || Fdie - mkdir texmf || Fdie - tar xzf tetex-texmf-$pkgver.tar.gz -C ./texmf - rm -fv $startdir/src/tetex-texmf-$pkgver.tar.gz || Fdie - install -d $startdir/pkg/usr/share/texmf || Fdie - cd texmf || Fdie - mv doc/latex/general/lshort.pdf $startdir/src/ || Fdie - rm -rf doc/* || Fdie - cat << EOF >doc/README.frugalware -The contents of the doc directory is removed to tetex-docs package, what is -availabe in xbit's repository: - http://wiki.frugalware.org/DRs -EOF - mv $startdir/src/lshort.pdf doc/ || Fdie - mv `ls` $startdir/pkg/usr/share/texmf || Fdie - cd .. || Fdie - rmdir texmf || Fdie - -###SRC - - tar xzf tetex-src-$pkgver.tar.gz - cd tetex-src-$pkgver - Fpatchall - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --enable-shared \ - --disable-multiplatform \ - --without-texinfo \ - --without-dialog \ - --without-texi2html \ - --with-x \ - --enable-ipc \ - --with-system-zlib \ - --with-system-pnglib \ - --with-system-ncurses \ - --with-system-gd \ - --with-system-t1lib - make all texmf=$startdir/pkg/usr/share/texmf || return 1 - - Fmv usr/share/texmf/ls-R usr/share/texmf/ls-R.tetex-texmf.orig - - make install prefix=$startdir/pkg/usr texmf=$startdir/pkg/usr/share/texmf - - Fmv usr/share/texmf/ls-R usr/share/texmf/ls-R.tetex-bin.orig - - #cp $startdir/src/haltp.tex $startdir/pkg/usr/share/texmf/doc - Frm usr/share/info/dir - - # Remove conflicting files with texet-kpathsea - Frm usr/bin/{kpseaccess,kpsereadlink,kpsestat,kpsewhich,mktexlsr,mktexmf,mktexpk,mktextfm} - Frm usr/include/kpathsea - Frm usr/info/kpathsea.info - Frm usr/lib/libkpathsea.* - Frm usr/man/man1/{kpseaccess,kpsereadlink,kpsestat,kpsewhich,mktexlsr,mktexmf,mktexpk,mktextfm}.* -} - -# optimization OK diff --git a/source/xapps-extra/tetex/glibc210.diff b/source/xapps-extra/tetex/glibc210.diff deleted file mode 100644 index 1694bf1..0000000 --- a/source/xapps-extra/tetex/glibc210.diff +++ /dev/null @@ -1,54 +0,0 @@ -diff -Naur tetex-src-3.0.orig/texk/dvipsk/afm2tfm.c tetex-src-3.0/texk/dvipsk/afm2tfm.c ---- tetex-src-3.0.orig/texk/dvipsk/afm2tfm.c 2009-07-21 05:59:32.635014710 -0700 -+++ tetex-src-3.0/texk/dvipsk/afm2tfm.c 2009-07-21 13:37:27.978595399 -0700 -@@ -257,7 +257,7 @@ - } - - int --getline P1H(void) { -+tetex_getline P1H(void) { - register char *p ; - register int c ; - -@@ -606,7 +606,7 @@ - ai = newchar() ; - ai->adobenum = -1 ; - ai->adobename = "||" ; /* boundary character name */ -- while (getline()) { -+ while (tetex_getline()) { - switch(interest(paramstring())) { - case FontName: - fontname = paramnewstring() ; -@@ -1882,7 +1882,7 @@ - - while (1) { - while (param == 0 || *param == 0) { -- if (getline() == 0) -+ if (tetex_getline() == 0) - error("! premature end in encoding file") ; - for (p=buffer; *p; p++) - if (*p == '%') { -@@ -1973,7 +1973,7 @@ - p = gettoken() ; - if (strcmp(p, "]")) - error("! token 258 in encoding must be make-array (])") ; -- while (getline()) { -+ while (tetex_getline()) { - for (p=buffer; *p; p++) - if (*p == '%') { - if (ignoreligkern == 0) ---- tetex-src-3.0old/texk/web2c/cpascal.h 2009-08-19 14:29:38.000000000 +0200 -+++ tetex-src-3.0/texk/web2c/cpascal.h 2009-08-19 14:31:25.000000000 +0200 -@@ -240,6 +240,12 @@ - #undef getname - #define getname vms_getname - #endif -+ -+#ifdef getline -+#undef getline -+#endif -+#define getline web2c_getline -+ - - /* Declarations for the routines we provide ourselves in lib/. */ - diff --git a/source/xapps-extra/tetex/tetex-3.0-CVE-2005-3193.patch b/source/xapps-extra/tetex/tetex-3.0-CVE-2005-3193.patch deleted file mode 100644 index b8f2fad..0000000 --- a/source/xapps-extra/tetex/tetex-3.0-CVE-2005-3193.patch +++ /dev/null @@ -1,169 +0,0 @@ ---- tetex-src-3.0/libs/xpdf/goo/gmem.c.CVE-2005-3193 2004-01-22 02:26:44.000000000 +0100 -+++ tetex-src-3.0/libs/xpdf/goo/gmem.c 2006-01-16 15:41:04.000000000 +0100 -@@ -135,6 +135,28 @@ void *grealloc(void *p, int size) { - #endif - } - -+void *gmallocn(int nObjs, int objSize) { -+ int n; -+ -+ n = nObjs * objSize; -+ if (objSize == 0 || n / objSize != nObjs) { -+ fprintf(stderr, "Bogus memory allocation size\n"); -+ exit(1); -+ } -+ return gmalloc(n); -+} -+ -+void *greallocn(void *p, int nObjs, int objSize) { -+ int n; -+ -+ n = nObjs * objSize; -+ if (objSize == 0 || n / objSize != nObjs) { -+ fprintf(stderr, "Bogus memory allocation size\n"); -+ exit(1); -+ } -+ return grealloc(p, n); -+} -+ - void gfree(void *p) { - #ifdef DEBUG_MEM - int size; ---- tetex-src-3.0/libs/xpdf/goo/gmem.h.CVE-2005-3193 2004-01-22 02:26:44.000000000 +0100 -+++ tetex-src-3.0/libs/xpdf/goo/gmem.h 2006-01-16 15:41:04.000000000 +0100 -@@ -28,6 +28,15 @@ extern void *gmalloc(int size); - extern void *grealloc(void *p, int size); - - /* -+ * These are similar to gmalloc and grealloc, but take an object count -+ * and size. The result is similar to allocating nObjs * objSize -+ * bytes, but there is an additional error check that the total size -+ * doesn't overflow an int. -+ */ -+extern void *gmallocn(int nObjs, int objSize); -+extern void *greallocn(void *p, int nObjs, int objSize); -+ -+/* - * Same as free, but checks for and ignores NULL pointers. - */ - extern void gfree(void *p); ---- tetex-src-3.0/libs/xpdf/xpdf/JPXStream.cc.CVE-2005-3193 2004-01-22 02:26:45.000000000 +0100 -+++ tetex-src-3.0/libs/xpdf/xpdf/JPXStream.cc 2006-01-16 15:41:04.000000000 +0100 -@@ -666,7 +666,7 @@ GBool JPXStream::readCodestream(Guint le - int segType; - GBool haveSIZ, haveCOD, haveQCD, haveSOT; - Guint precinctSize, style; -- Guint segLen, capabilities, comp, i, j, r; -+ Guint segLen, capabilities, nTiles, comp, i, j, r; - - //----- main header - haveSIZ = haveCOD = haveQCD = haveSOT = gFalse; -@@ -701,8 +701,13 @@ GBool JPXStream::readCodestream(Guint le - / img.xTileSize; - img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) - / img.yTileSize; -- img.tiles = (JPXTile *)gmalloc(img.nXTiles * img.nYTiles * -- sizeof(JPXTile)); -+ nTiles = img.nXTiles * img.nYTiles; -+ // check for overflow before allocating memory -+ if (nTiles == 0 || nTiles / img.nXTiles != img.nYTiles) { -+ error(getPos(), "Bad tile count in JPX SIZ marker segment"); -+ return gFalse; -+ } -+ img.tiles = (JPXTile *)gmallocn(nTiles, sizeof(JPXTile)); - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].tileComps = (JPXTileComp *)gmalloc(img.nComps * - sizeof(JPXTileComp)); ---- tetex-src-3.0/libs/xpdf/xpdf/Stream.h.CVE-2005-3193 2004-01-22 02:26:45.000000000 +0100 -+++ tetex-src-3.0/libs/xpdf/xpdf/Stream.h 2006-01-16 15:41:04.000000000 +0100 -@@ -233,6 +233,8 @@ public: - - ~StreamPredictor(); - -+ GBool isOk() { return ok; } -+ - int lookChar(); - int getChar(); - -@@ -250,6 +252,7 @@ private: - int rowBytes; // bytes per line - Guchar *predLine; // line buffer - int predIdx; // current index in predLine -+ GBool ok; - }; - - //------------------------------------------------------------------------ ---- tetex-src-3.0/libs/xpdf/xpdf/Stream.cc.CVE-2005-3193 2004-01-22 02:26:45.000000000 +0100 -+++ tetex-src-3.0/libs/xpdf/xpdf/Stream.cc 2006-01-16 15:41:04.000000000 +0100 -@@ -407,18 +407,33 @@ void ImageStream::skipLine() { - - StreamPredictor::StreamPredictor(Stream *strA, int predictorA, - int widthA, int nCompsA, int nBitsA) { -+ int totalBits; -+ - str = strA; - predictor = predictorA; - width = widthA; - nComps = nCompsA; - nBits = nBitsA; -+ predLine = NULL; -+ ok = gFalse; - - nVals = width * nComps; -+ totalBits = nVals * nBits; -+ if (totalBits == 0 || -+ (totalBits / nBits) / nComps != width || -+ totalBits + 7 < 0) { -+ return; -+ } - pixBytes = (nComps * nBits + 7) >> 3; -- rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes; -+ rowBytes = ((totalBits + 7) >> 3) + pixBytes; -+ if (rowBytes < 0) { -+ return; -+ } - predLine = (Guchar *)gmalloc(rowBytes); - memset(predLine, 0, rowBytes); - predIdx = rowBytes; -+ -+ ok = gTrue; - } - - StreamPredictor::~StreamPredictor() { -@@ -1012,6 +1027,10 @@ LZWStream::LZWStream(Stream *strA, int p - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } -@@ -2897,6 +2916,14 @@ GBool DCTStream::readBaselineSOF() { - height = read16(); - width = read16(); - numComps = str->getChar(); -+ if (numComps <= 0 || numComps > 4) { -+ error(getPos(), "Bad number of components in DCT stream", prec); -+ return gFalse; -+ } -+ if (numComps <= 0 || numComps > 4) { -+ error(getPos(), "Bad number of components in DCT stream", prec); -+ return gFalse; -+ } - if (prec != 8) { - error(getPos(), "Bad DCT precision %d", prec); - return gFalse; -@@ -3255,6 +3282,10 @@ FlateStream::FlateStream(Stream *strA, i - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } diff --git a/source/xapps-extra/tetex/tetex-3.0-CVE-2007-0650.patch b/source/xapps-extra/tetex/tetex-3.0-CVE-2007-0650.patch deleted file mode 100644 index 4df77e5..0000000 --- a/source/xapps-extra/tetex/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 <num>\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/source/xapps-extra/tetex/tetex-3.0-CVE-2007-3387.patch b/source/xapps-extra/tetex/tetex-3.0-CVE-2007-3387.patch deleted file mode 100644 index 0caa7c2..0000000 --- a/source/xapps-extra/tetex/tetex-3.0-CVE-2007-3387.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- tetex-src-3.0/libs/xpdf/xpdf/Stream.cc.CVE-2007-3387 2007-07-26 17:13:02.000000000 +0200 -+++ tetex-src-3.0/libs/xpdf/xpdf/Stream.cc 2007-07-26 17:21:58.000000000 +0200 -@@ -15,6 +15,7 @@ - #include <stdio.h> - #include <stdlib.h> - #include <stddef.h> -+#include <limits.h> - #ifndef WIN32 - #include <unistd.h> - #endif -@@ -32,6 +33,7 @@ - #include "JBIG2Stream.h" - #include "JPXStream.h" - #include "Stream-CCITT.h" -+#include "GfxState.h" - - #ifdef __DJGPP__ - static GBool setDJSYSFLAGS = gFalse; -@@ -429,6 +431,13 @@ StreamPredictor::StreamPredictor(Stream - if (rowBytes < 0) { - return; - } -+ if (width <= 0 || nComps <= 0 || nBits <= 0 || -+ nComps > gfxColorMaxComps || -+ nBits > 16 || -+ width >= INT_MAX / nComps || // check for overflow in nVals -+ nVals >= (INT_MAX - 7) / nBits) { // check for overflow in rowBytes -+ return; -+ } - predLine = (Guchar *)gmalloc(rowBytes); - memset(predLine, 0, rowBytes); - predIdx = rowBytes; diff --git a/source/xapps-extra/tetex/tetex-3.0-CVE-2007-5935.patch b/source/xapps-extra/tetex/tetex-3.0-CVE-2007-5935.patch deleted file mode 100644 index a667fab..0000000 --- a/source/xapps-extra/tetex/tetex-3.0-CVE-2007-5935.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff -Nur tetex-bin-3.0/texk/dvipsk/hps.c tetex-bin-3.0.new/texk/dvipsk/hps.c ---- tetex-bin-3.0/texk/dvipsk/hps.c 2005-01-15 19:05:00.000000000 -0500 -+++ tetex-bin-3.0.new/texk/dvipsk/hps.c 2007-12-04 10:35:18.000000000 -0500 -@@ -441,19 +441,28 @@ - - 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); -+ - - } - -@@ -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/source/xapps-extra/tetex/tetex-3.0-CVE-2007-5936+5937.patch b/source/xapps-extra/tetex/tetex-3.0-CVE-2007-5936+5937.patch deleted file mode 100644 index f9cb5ab..0000000 --- a/source/xapps-extra/tetex/tetex-3.0-CVE-2007-5936+5937.patch +++ /dev/null @@ -1,795 +0,0 @@ -diff -Nur tetex-bin-3.0/texk/dviljk/dvi2xx.c tetex-bin-3.0.new/texk/dviljk/dvi2xx.c ---- tetex-bin-3.0/texk/dviljk/dvi2xx.c 1999-02-06 16:46:34.000000000 -0500 -+++ tetex-bin-3.0.new/texk/dviljk/dvi2xx.c 2007-12-05 13:24:42.000000000 -0500 -@@ -173,7 +173,7 @@ - y_origin = YDEFAULTOFF; /* y-origin in dots */ - - setbuf(ERR_STREAM, NULL); -- (void) strcpy(G_progname, argv[0]); -+ G_progname = argv[0]; - #ifdef KPATHSEA - kpse_set_progname(argv[0]); - kpse_set_program_enabled (kpse_pk_format, MAKE_TEX_PK_BY_DEFAULT, kpse_src_compile); -@@ -2968,8 +2968,8 @@ - #endif - { - int argind; /* argument index for flags */ -- char curarea[STRSIZE]; /* current file area */ -- char curname[STRSIZE]; /* current file name */ -+ char *curarea; /* current file area */ -+ char *curname; /* current file name */ - char *tcp, *tcp1; /* temporary character pointers */ - char *this_arg; - double x_offset = 0.0, y_offset = 0.0; -@@ -2988,9 +2988,9 @@ - #endif - #endif - -- if (argc == 2 && (strcmp (argv[1], "--version") == 0)) { -+ if (argc == 2 && EQ(argv[1], "--version")) { - extern KPSEDLL char *kpathsea_version_string; -- puts ("dvilj(k) 2.6"); -+ puts (VERSION); - puts (kpathsea_version_string); - puts ("Copyright (C) 1997 Gustaf Neumann.\n\ - There is NO warranty. You may redistribute this software\n\ -@@ -3328,8 +3328,8 @@ - } - } else { - -- (void) strcpy(filename, tcp); -- if (!strcmp(filename, "-")) { -+ filename = tcp; -+ if (EQ(filename, "-")) { - EmitFileName = "-"; - #ifdef RISC_USE_OSL - dvifp = BINOPEN("Kbd:"); -@@ -3339,57 +3339,68 @@ - AssureBinary(fileno(dvifp)); - #endif - } else { -+ /* Since this code is used only once during startup, we don't care -+ about free()ing the allocated strings that represent filenames. -+ It will be more work to realize proper deallocation handling than -+ it's worth in terms of saving a few bytes. We consider these -+ bytes actually static memory where we don't know the size in -+ advance and don't add them to the allocated_storage count. -+ [27 Jun 07 -js] */ - #ifdef KPATHSEA - /* split into directory + file name */ - int tcplen, argvlen; - tcp = (char *)xbasename(argv[argind]);/* this knows about any kind of slashes */ - tcplen = strlen(tcp); -+ if ( tcplen == 0 ) { -+ /* This happens when the DVI file name has a trailing slash; this -+ is not a valid name. Then we terminate the argument parsing -+ loop, a usage message will be output below. */ -+ break; -+ } - argvlen = strlen(argv[argind]); - if (tcplen == argvlen) -- curarea[0] = '\0'; -+ curarea = ""; - else { -- (void) strcpy(curarea, argv[argind]); -+ curarea = xstrdup(argv[argind]); - curarea[argvlen-tcplen] = '\0'; - } - #else - tcp = strrchr(argv[argind], '/'); - /* split into directory + file name */ - if (tcp == NULL) { -- curarea[0] = '\0'; -+ curarea[0] = ""; - tcp = argv[argind]; - } else { -- (void) strcpy(curarea, argv[argind]); -+ curarea = xstrdup(argv[argind]); - curarea[tcp-argv[argind]+1] = '\0'; - tcp += 1; - } - #endif - -+ curname = (char *) xmalloc(strlen(tcp)+5); /* + space for ".dvi" */ - (void) strcpy(curname, tcp); - /* split into file name + extension */ -- tcp1 = strrchr(tcp, '.'); -+ tcp1 = strrchr(curname, '.'); - if (tcp1 == NULL) { -- (void) strcpy(rootname, curname); -+ rootname = xstrdup(curname); - strcat(curname, ".dvi"); - } else { - *tcp1 = '\0'; -- (void) strcpy(rootname, curname); -+ rootname = xstrdup(curname); - *tcp1 = '.'; - } - -+ filename = (char *) xmalloc(strlen(curarea)+strlen(curname)+1); - (void) strcpy(filename, curarea); - (void) strcat(filename, curname); - - if ((dvifp = BINOPEN(filename)) == FPNULL) { - /* do not insist on .dvi */ - if (tcp1 == NULL) { -- int l = strlen(curname); -- if (l > 4) -- curname[l - 4] = '\0'; -- l = strlen(filename); -- if (l > 4) -- filename[l - 4] = '\0'; -+ filename[strlen(filename) - 4] = '\0'; -+ dvifp = BINOPEN(filename); - } -- if (tcp1 != NULL || (dvifp = BINOPEN(filename)) == FPNULL) { -+ if (dvifp == FPNULL) { - #ifdef MSC5 - Fatal("%s: can't find DVI file \"%s\"\n\n", - G_progname, filename); -@@ -3507,13 +3518,8 @@ - exit(1); - } - if (EQ(EmitFileName, "")) { -- if ((EmitFileName = (char *)malloc( STRSIZE )) != NULL) -- allocated_storage += STRSIZE; -- else -- Fatal("Can't allocate storage of %d bytes\n",STRSIZE); -- (void) strcpy(EmitFileName, curname); -- if ((tcp1 = strrchr(EmitFileName, '.'))) -- *tcp1 = '\0'; -+ EmitFileName = (char *) xmalloc(strlen(rootname)+sizeof(EMITFILE_EXTENSION)); -+ (void) strcpy(EmitFileName, rootname); - strcat(EmitFileName, EMITFILE_EXTENSION); - } - if (G_quiet) -@@ -3698,6 +3704,8 @@ - #endif - } - CloseFiles(); -+ if ( tmp_dir[0] != '\0' ) -+ rmdir (tmp_dir); /* ignore errors */ - exit(G_errenc); - } - -@@ -3895,22 +3903,21 @@ - int n; - #endif - { -- char spbuf[STRSIZE], xs[STRSIZE], ys[STRSIZE]; -- char *sf = NULL, *psfile = NULL; -+ char xs[STRSIZE], ys[STRSIZE]; -+ char *include_file = NULL; -+ enum { VerbFile, HPFile, PSFile } file_type; - float x,y; - long4 x_pos, y_pos; - KeyWord k; - int i, j, j1; - static int GrayScale = 10, Pattern = 1; - static bool GrayFill = _TRUE; -- static long4 p_x[80], p_y[80]; -- int llx=0, lly=0, urx=0, ury=0, rwi=0, rhi=0; --#ifdef WIN32 -- char *gs_path; --#endif -+ static long4 p_x[MAX_SPECIAL_DEFPOINTS], p_y[MAX_SPECIAL_DEFPOINTS]; -+ int llx=0, lly=0, urx=0, ury=0, rwi=0; - - str[n] = '\0'; -- spbuf[0] = '\0'; -+ for ( i=0 ; i<MAX_SPECIAL_DEFPOINTS ; i++ ) -+ p_x[i] = p_y[i] = -1; - - SetPosn(h, v); - #ifdef __riscos -@@ -3924,41 +3931,30 @@ - /* get all keyword-value pairs */ - /* for compatibility, single words are taken as file names */ - if ( k.vt == None && access(k.Key, 0) == 0) { -- if ( sf --#ifdef KPATHSEA -- && !kpse_tex_hush ("special") --#endif -- ) -- Warning("More than one \\special file name given. %s ignored", sf); -- (void) strcpy(spbuf, k.Key); -- sf = spbuf; -- /* -- for (j = 1; ((sf[j]=='/' ? sf[j]='\\':sf[j]) != '\0'); j++); -- */ -- } else if ( GetKeyVal( &k, KeyTab, NKEYS, &i ) && i != -1 ) -+ if ( include_file && !kpse_tex_hush ("special") ) { -+ Warning("More than one \\special file name given. %s ignored", include_file); -+ free (include_file); -+ } -+ include_file = xstrdup(k.Key); -+ file_type = VerbFile; -+ } else if ( GetKeyVal( &k, KeyTab, NKEYS, &i ) && i != -1 ) { - switch (i) { - case PSFILE: -- if (sf --#ifdef KPATHSEA -- && !kpse_tex_hush ("special") --#endif -- ) -- Warning("More than one \\special file name given. %s ignored", sf); -- (void) strcpy(spbuf, k.Val); -- psfile = spbuf; -- /* -- for (j=1; ((sf[j]=='/' ? sf[j]='\\':sf[j]) != '\0'); j++); -- */ -+ if ( include_file ) { -+ Warning("More than one \\special file name given. %s ignored", include_file); -+ free(include_file); -+ } -+ include_file = xstrdup(k.Val); -+ file_type = PSFile; - break; - - case HPFILE: -- if (sf) -- Warning("More than one \\special file name given. %s ignored", sf); -- (void) strcpy(spbuf, k.Val); -- sf = spbuf; -- /* -- for (j=1; ((sf[j]=='/' ? sf[j]='\\':sf[j]) != '\0'); j++); -- */ -+ if ( include_file && !kpse_tex_hush ("special") ) { -+ Warning("More than one \\special file name given. %s ignored", include_file); -+ free(include_file); -+ } -+ include_file = xstrdup(k.Val); -+ file_type = HPFile; - break; - - case ORIENTATION: -@@ -3978,23 +3974,24 @@ - } - #endif - else --#ifdef KPATHSEA -- if (!kpse_tex_hush ("special")) --#endif - Warning( "Invalid orientation (%d)given; ignored.", k.v.i); - break; - - case RESETPOINTS: -- (void) strcpy(spbuf, k.Val); -- -- sf = NULL; -+ for ( i=0 ; i<MAX_SPECIAL_DEFPOINTS ; i++ ) -+ p_x[i] = p_y[i] = -1; - break; - - case DEFPOINT: -- (void) strcpy(spbuf, k.Val); -- i = sscanf(spbuf,"%d(%[^,],%s)",&j,xs,ys); -+ /* 254 is STRSIZE-1. cpp should be used to construct that number. */ -+ i = sscanf(k.Val,"%d(%254[^,],%254s)",&j,xs,ys); - if (i>0) { -- x_pos = h; -+ if ( j < 0 || j >= MAX_SPECIAL_DEFPOINTS ) { -+ Warning ("defpoint %d ignored, must be between 0 and %d", -+ j, MAX_SPECIAL_DEFPOINTS); -+ break; -+ } -+ x_pos = h; - y_pos = v; - if (i>1) { - if (sscanf(xs,"%fpt",&x)>0) { -@@ -4011,19 +4008,32 @@ - p_x[j]=x_pos; - p_y[j]=y_pos; - } else --#ifdef KPATHSEA -- if (!kpse_tex_hush ("special")) --#endif - Warning("invalid point definition\n"); -- -- sf = NULL; - break; - - case FILL: -- (void) strcpy(spbuf, k.Val); -- i = sscanf(spbuf,"%d/%d %s",&j,&j1,xs); -+ /* 254 is STRSIZE-1. cpp should be used to construct that number. */ -+ i = sscanf(k.Val,"%d/%d %254s",&j,&j1,xs); - if (i>1) { - #ifdef LJ -+ if ( j < 0 || j >= MAX_SPECIAL_DEFPOINTS ) { -+ Warning ("fill ignored, point %d must be between 0 and %d", -+ j, MAX_SPECIAL_DEFPOINTS); -+ break; -+ } -+ if ( p_x[j] == -1 ) { -+ Warning ("fill ignored, point %d is undefined\n", j); -+ break; -+ } -+ if ( j1 < 0 || j1 >= MAX_SPECIAL_DEFPOINTS ) { -+ Warning ("fill ignored, point %d must be between 0 and %d", -+ j1, MAX_SPECIAL_DEFPOINTS); -+ break; -+ } -+ if ( p_x[j1] == -1 ) { -+ Warning ("fill ignored, point %d is undefined\n", j1); -+ break; -+ } - SetPosn(p_x[j], p_y[j]); - x_pos = (long4)PIXROUND(p_x[j1]-p_x[j], hconv); - y_pos = (long4)PIXROUND(p_y[j1]-p_y[j], vconv); -@@ -4044,9 +4054,6 @@ - GrayScale = k.v.i; - GrayFill = _TRUE; - } else --#ifdef KPATHSEA -- if (!kpse_tex_hush ("special")) --#endif - Warning( "Invalid gray scale (%d) given; ignored.", k.v.i); - break; - -@@ -4055,9 +4062,6 @@ - Pattern = k.v.i; - GrayFill = _FALSE; - } else --#ifdef KPATHSEA -- if (!kpse_tex_hush ("special")) --#endif - Warning( "Invalid pattern (%d) given; ignored.", k.v.i); - break; - -@@ -4066,75 +4070,122 @@ - case URX: urx = k.v.i; break; - case URY: ury = k.v.i; break; - case RWI: rwi = k.v.i; break; -- case RHI: rhi = k.v.i; break; -+ case RHI: -+ if (!kpse_tex_hush ("special")) -+ Warning("Whatever rhi was good for once, it is ignored now."); -+ break; - - default: --#ifdef KPATHSEA -- if (!kpse_tex_hush ("special")) --#endif -+ if ( !kpse_tex_hush ("special") ) - Warning("Can't handle %s=%s command; ignored.", k.Key, k.Val); - break; - } -- -- else --#ifdef KPATHSEA -- if (!kpse_tex_hush ("special")) --#endif -+ -+ } else if (!kpse_tex_hush ("special")) { - Warning("Invalid keyword or value in \\special - <%s> ignored", k.Key); -+ } -+ -+ free (k.Key); -+ if ( k.Val != NULL ) free(k.Val); - } - -- if ( sf || psfile ) { -+ if ( include_file ) { - last_rx = last_ry = UNKNOWN; - #ifdef IBM3812 - PMPflush; - #endif -- if (sf) { -- if (i == HPFILE) -- CopyHPFile( sf ); -- else -- CopyFile( sf ); -- } -- else -+ - #ifdef LJ -- if (psfile) { -+ if ( file_type == PSFile) { - /* int height = rwi * (urx - llx) / (ury - lly);*/ - int width = urx - llx; - int height = ury - lly; - char cmd[255]; -- int scale_factor = 3000 * width / rwi; -- int adjusted_height = height * 300/scale_factor; -- int adjusted_llx = llx * 300/scale_factor; -+ char *cmd_format = "%s -q -dSIMPLE -dSAFER -dNOPAUSE -sDEVICE=%s -sOutputFile=%s %s %s showpage.ps -c quit"; -+ char *gs_cmd; -+ int scale_factor, adjusted_height, adjusted_llx; - char *printer = "ljetplus"; /* use the most stupid one */ - -- -- char scale_file_name[255]; -- char *scale_file = tmpnam(scale_file_name); -- char *pcl_file = tmpnam(NULL); -+ char pcl_file[STRSIZE]; -+ char scale_file[STRSIZE]; - FILEPTR scalef; - -- if ( (scalef = BOUTOPEN(scale_file)) == FPNULL ) { -- Warning("Unable to open file %s for writing", scale_file ); -- return; -- } -- fprintf(scalef, "%.2f %.2f scale\n%d %d translate\n", -- 300.0/scale_factor, 300.0/scale_factor, -- 0, adjusted_height == height ? 0 : ury); -- BCLOSE( scalef ); -+ if ( urx == 0 || ury == 0 || rwi == 0 ) { -+ /* Since dvips' psfile special has a different syntax, this might -+ well be one of those specials, i.e., a non-dviljk special. Then -+ the Warning should be suppressable. */ -+ if ( !kpse_tex_hush ("special") ) -+ Warning ("Ignoring psfile special without urx, ury and rwi attributes"); -+ free (include_file); -+ return; -+ } -+ scale_factor = 3000 * width / rwi; -+ adjusted_height = height * 300/scale_factor; -+ adjusted_llx = llx * 300/scale_factor; -+ -+ /* We cannot use mkstemp, as we cannot pass two open file descriptors -+ portably to Ghostscript. We don't want to use tmpnam() or tempnam() -+ either, as they have tempfile creation race conditions. Instead we -+ create a temporary directory with mkdtemp(). We need to create the -+ temporary directory only once per run; it will be deleted in -+ AllDone(). */ -+ if ( tmp_dir[0] == '\0' ) { -+ char * base_dir; -+ if ( (base_dir = getenv("TMPDIR")) == NULL ) { -+ base_dir = "/tmp"; -+ } else if ( strlen(base_dir) > STRSIZE - sizeof("/dviljkXXXXXX/include.pcl") ) { -+ Warning ("TMPDIR %s is too long, using /tmp instead", base_dir); -+ base_dir = "/tmp"; -+ } -+ if ( base_dir[0] == '/' && base_dir[1] == '\0' ) { -+ Warning ("Feeling naughty, do we? / is no temporary directory, dude"); -+ base_dir = "/tmp"; -+ } -+ strcpy (tmp_dir, base_dir); -+ strcat (tmp_dir, "/dviljkXXXXXX"); -+ if ( mkdtemp(tmp_dir) == NULL ) { -+ Warning ("Could not create temporary directory %s, errno = %d; ignoring include file special", -+ tmp_dir, errno); -+ return; -+ } -+ } -+ strcpy(pcl_file, tmp_dir); -+ strcat(pcl_file, "/include.pcl"); -+ strcpy(scale_file, tmp_dir); -+ strcat(scale_file, "/scale.ps"); -+ -+ if ( (scalef = BOUTOPEN(scale_file)) == FPNULL ) { -+ Warning("Unable to open file %s for writing", scale_file ); -+ free (include_file); -+ unlink(scale_file); /* ignore error */ -+ return; -+ } -+ fprintf(scalef, "%.2f %.2f scale\n%d %d translate\n", -+ 300.0/scale_factor, 300.0/scale_factor, -+ 0, adjusted_height == height ? 0 : ury); -+ BCLOSE( scalef ); - - #ifdef WIN32 -- gs_path = getenv("GS_PATH"); -- if (!gs_path) -- gs_path = "gswin32c.exe"; -- sprintf(cmd,"%s -q -dSIMPLE -dSAFER -dNOPAUSE -sDEVICE=%s -sOutputFile=%s %s %s showpage.ps -c quit", -- gs_path, printer, pcl_file, scale_file, psfile); -+ if ( (gs_cmd = getenv("GS_PATH")) == NULL ) -+ gs_cmd = "gswin32c.exe"; - #else -- sprintf(cmd,"gs -q -dSIMPLE -dSAFER -dNOPAUSE -sDEVICE=%s -sOutputFile=%s %s %s showpage.ps -c quit", -- printer, pcl_file, scale_file, psfile); -+ gs_cmd = "gs"; - #endif -+ if ( strlen(cmd_format)-10 + strlen(gs_cmd) + strlen(printer) + -+ strlen(pcl_file) + strlen(scale_file) + strlen(include_file) +1 > -+ sizeof(cmd) ) { -+ Warning ("Ghostscript command for %s would be too long, skipping special", include_file); -+ free (include_file); -+ unlink(scale_file); /* ignore errors */ -+ unlink(pcl_file); -+ return; -+ } -+ sprintf(cmd, cmd_format, -+ gs_cmd, printer, pcl_file, scale_file, include_file); - #ifdef DEBUGGS - fprintf(stderr, - "PS-file '%s' w=%d, h=%d, urx=%d, ury=%d, llx=%d, lly=%d, rwi=%d\n", -- psfile, urx - llx, height, urx,ury,llx,lly, rwi); -+ include_file, urx - llx, height, urx,ury,llx,lly, rwi); - fprintf(stderr,"%s\n",cmd); - #endif - if (system(cmd)) { -@@ -4158,11 +4209,21 @@ - #endif - - CopyHPFile( pcl_file ); -- /* unlink(pcl_file); */ -- /* unlink(scale_file); */ -- } - } -+ unlink(scale_file); /* ignore errors */ -+ unlink(pcl_file); -+ } -+ else - #endif /* LJ */ -+ -+ if ( file_type == HPFile ) -+ CopyHPFile( include_file ); -+ else if ( file_type == VerbFile ) -+ CopyFile( include_file ); -+ else -+ Warning ("This can't happen: unknown file_type value %d", file_type); -+ -+ if ( include_file != NULL ) free(include_file); - } - } - -@@ -4173,12 +4234,11 @@ - /**********************************************************************/ - /***************************** GetKeyStr ****************************/ - /**********************************************************************/ --/* extract first keyword-value pair from string (value part may be null) -- * return pointer to remainder of string -- * return NULL if none found -+/* Extract first keyword-value pair from string (value part may be null), -+ * keyword and value are allocated and must be free by caller. -+ * Return pointer to remainder of string, -+ * return NULL if none found. - */ --char KeyStr[STRSIZE]; --char ValStr[STRSIZE]; - #if NeedFunctionPrototypes - char *GetKeyStr(char *str, KeyWord *kw ) - #else -@@ -4187,39 +4247,46 @@ - KeyWord *kw; - #endif - { -- char *s, *k, *v, t; -+ char *s, *start; -+ char save_char, quote_char; - if ( !str ) - return( NULL ); - for (s = str; *s == ' '; s++) - ; /* skip over blanks */ - if (*s == '\0') - return( NULL ); -- for (k = KeyStr; /* extract keyword portion */ -- *s != ' ' && *s != '\0' && *s != '='; -- *k++ = *s++) -- ; -- *k = '\0'; -- kw->Key = KeyStr; -- kw->Val = v = NULL; -+ start = s++; /* start of keyword */ -+ while ( *s != ' ' && *s != '\0' && *s != '=' ) /* locate end */ -+ s++; -+ save_char = *s; -+ *s = '\0'; -+ kw->Key = xstrdup(start); -+ kw->Val = NULL; - kw->vt = None; -- for ( ; *s == ' '; s++) -- ; /* skip over blanks */ -- if ( *s != '=' ) /* look for "=" */ -+ if ( save_char == '\0' ) /* shortcut when we're at the end */ -+ return (s); -+ *s = save_char; /* restore keyword end char */ -+ while ( *s == ' ' ) s++ ; /* skip over blanks */ -+ if ( *s != '=' ) /* no "=" means no value */ - return( s ); -- for (s++; *s == ' '; s++); /* skip over blanks */ -- if ( *s == '\'' || *s == '\"' ) /* get string delimiter */ -- t = *s++; -+ for (s++; *s == ' '; s++) -+ ; /* skip over blanks */ -+ if ( *s == '\'' || *s == '\"' ) /* get string delimiter */ -+ quote_char = *s++; - else -- t = ' '; -- for (v = ValStr; /* copy value portion up to delim */ -- *s != t && *s != '\0'; -- *v++ = *s++) -- ; -- if ( t != ' ' && *s == t ) -- s++; -- *v = '\0'; -- kw->Val = ValStr; -+ quote_char = ' '; -+ start = s; /* no increment, might be "" as value */ -+ while ( *s != quote_char && *s != '\0' ) -+ s++; /* locate end of value portion */ -+ save_char = *s; -+ *s = '\0'; -+ kw->Val = xstrdup(start); - kw->vt = String; -+ if ( save_char != '\0' ) { /* save_char is now quote_char */ -+ *s = save_char; -+ if ( quote_char != ' ' ) /* we had real quote chars */ -+ s++; -+ } - return( s ); - } - -@@ -4819,13 +4886,14 @@ - the resident fonts. */ - if (tfm_read_info(fontptr->n, &tfm_info) - && tfm_info.family[0] -- && strcmp((char *)tfm_info.family, "HPAUTOTFM") == 0) { -+ && EQ((char *)tfm_info.family, "HPAUTOTFM")) { - unsigned i; - double factor = fontptr->s / (double)0x100000; - - resident_count++; - fontptr->resident_p = _TRUE; -- strcpy(fontptr->symbol_set, (char *)tfm_info.coding_scheme); -+ strncpy(fontptr->symbol_set, (char *)tfm_info.coding_scheme, 39); -+ fontptr->symbol_set[39] = '\0'; - fontptr->resid = tfm_info.typeface_id; - fontptr->spacing = tfm_info.spacing; - fontptr->style = tfm_info.style; -@@ -4878,7 +4946,7 @@ - fontptr->resident_p = _FALSE; - - if (tfm_info.family[0] -- && strcmp((char *)tfm_info.family, "UNSPECIFIED") == 0) { -+ && EQ((char *)tfm_info.family, "UNSPECIFIED")) { - Warning("font family for %s is UNSPECIFIED; need to run dvicopy?", - fontptr->n); - fontptr->font_file_id = NO_FILE; -@@ -5031,10 +5099,9 @@ - if (tfontptr->resident_p) - return; - -- if (!(resident_font_located)) { -+ if (!(resident_font_located)) - #endif - --#ifdef KPATHSEA - { - kpse_glyph_file_type font_ret; - char *name; -@@ -5047,9 +5114,9 @@ - if (name) - { - font_found = _TRUE; -- strcpy (tfontptr->name, name); -- free (name); -- -+ tfontptr->name = name; -+ allocated_storage += strlen(name)+1; -+ - if (!FILESTRCASEEQ (tfontptr->n, font_ret.name)) { - fprintf (stderr, - "dvilj: Font %s not found, using %s at %d instead.\n", -@@ -5071,29 +5138,6 @@ - tfontptr->n, dpi); - } - } --#else /* not KPATHSEA */ -- if (!(findfile(PXLpath, -- tfontptr->n, -- tfontptr->font_mag, -- tfontptr->name, -- _FALSE, -- 0))) { -- Warning(tfontptr->name); /* contains error messsage */ -- tfontptr->font_file_id = NO_FILE; --#ifdef __riscos -- MakeMetafontFile(PXLpath, tfontptr->n, tfontptr->font_mag); --#endif -- } -- else { -- font_found = _TRUE; -- if (G_verbose) -- fprintf(ERR_STREAM,"%d: using font <%s>\n", plusid, tfontptr->name); -- } --#endif /* not KPATHSEA */ -- --#ifdef LJ_RESIDENT_FONTS -- } --#endif - - tfontptr->plusid = plusid; - plusid++; -diff -Nur tetex-bin-3.0/texk/dviljk/dvi2xx.h tetex-bin-3.0.new/texk/dviljk/dvi2xx.h ---- tetex-bin-3.0/texk/dviljk/dvi2xx.h 1999-03-16 02:03:33.000000000 -0500 -+++ tetex-bin-3.0.new/texk/dviljk/dvi2xx.h 2007-12-05 13:24:42.000000000 -0500 -@@ -10,8 +10,8 @@ - - #ifdef KPATHSEA - #include <kpathsea/config.h> -+#include <kpathsea/c-std.h> - #include <kpathsea/c-limits.h> --#include <kpathsea/c-memstr.h> - #include <kpathsea/magstep.h> - #include <kpathsea/proginit.h> - #include <kpathsea/progname.h> -@@ -24,6 +24,7 @@ - #include <string.h> - #include <stdio.h> - #include <stdlib.h> -+#include <unistd.h> - #ifdef unix - #include <limits.h> - #endif -@@ -41,9 +42,6 @@ - #ifdef MSC5 - #include <dos.h> /* only for binaryopen on device */ - #endif --#if defined (unix) && !defined (KPATHSEA) --#include <limits.h> --#endif - - - #include "config.h" -@@ -116,6 +114,7 @@ - #define HUGE_SIZE (unsigned char) 2 - #define HUGE_CHAR_PATTERN 32767l - #define BYTES_PER_PIXEL_LINE 500 /* max number of bytes per pixel line */ -+#define MAX_SPECIAL_DEFPOINTS 80 /* max number of defpoint specials */ - - - #define PK_POST 245 -@@ -281,7 +280,14 @@ - #define VisChar(c) (unsigned char)(c) - #endif - --#define GetBytes(fp,buf,n) read_multi(buf,1,n,fp) /* used to be a function */ -+/* Used to be a function. buf is always an array, never a pointer. -+ Without that invariant, we would have to introduce full dynamic -+ memory management in this driver -- probably it would be easier to -+ write a new one. [27 Jun 07 -js] */ -+#define GetBytes(fp,buf,n) \ -+ ( sizeof(buf) != sizeof(void *) && sizeof(buf) > n ? \ -+ read_multi(buf, 1, n, fp) \ -+ : Fatal("Try to read %d bytes in an array of size %d", n, sizeof(buf)) ) - - - /**********************************************************************/ -@@ -307,6 +313,7 @@ - int sscanf(); - int strcmp(); - char *strcpy(); -+char *strncpy(); - # ifdef MSC5 - unsigned int strlen(); - # endif -@@ -393,7 +400,7 @@ - char n[STRSIZE]; /* FNT_DEF command parameters */ - long4 font_mag; /* computed from FNT_DEF s and d parameters */ - /*char psname[STRSIZE];*/ /* PostScript name of the font */ -- char name[STRSIZE]; /* full name of PXL file */ -+ char *name; /* full name of PXL file */ - FILEPTR font_file_id; /* file identifier (NO_FILE if none) */ - #ifdef USEPXL - long4 magnification; /* magnification read from PXL file */ -@@ -487,8 +494,8 @@ - long4 NoSignExtend DVIPROTO((FILEPTR, int)); - void OpenFontFile DVIPROTO((void)); - long4 PixRound DVIPROTO((long4, long4)); --void PkRaster DVIPROTO((struct char_entry *, int)); --void RasterLine DVIPROTO((struct char_entry *, unsigned int, -+void PkRaster DVIPROTO((struct char_entry *, int)); -+void RasterLine DVIPROTO((struct char_entry *, unsigned int, - unsigned int, unsigned char *)); - void RasterChar DVIPROTO((struct char_entry *)); - void ReadFontDef DVIPROTO((long4)); -@@ -534,11 +541,12 @@ - #ifndef KPATHSEA - char *PXLpath = FONTAREA; - #endif --char G_progname[STRSIZE]; /* program name */ --char filename[STRSIZE]; /* DVI file name */ --char rootname[STRSIZE]; /* DVI filename without extension */ -+char *G_progname; /* program name */ -+char *filename; /* DVI file name */ -+char *rootname; /* DVI filename without extension */ - char *HeaderFileName = ""; /* file name & path of Headerfile */ - char *EmitFileName = ""; /* file name & path for output */ -+char tmp_dir[STRSIZE] = ""; /* temporary directory for auxilliary files */ - #ifdef IBM3812 - bool FirstAlternate = _FALSE; /* first page from alternate casette ? */ - #endif diff --git a/source/xapps-extra/tetex/tetex-png-1.4.patch b/source/xapps-extra/tetex/tetex-png-1.4.patch deleted file mode 100644 index ad84bcf..0000000 --- a/source/xapps-extra/tetex/tetex-png-1.4.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -aur tetex-src-3.0/texk/dvipdfm/pngimage.c tetex-src-3.0-2/texk/dvipdfm/pngimage.c ---- tetex-src-3.0/texk/dvipdfm/pngimage.c 2002-12-25 11:51:16.000000000 -0600 -+++ tetex-src-3.0-2/texk/dvipdfm/pngimage.c 2010-05-06 10:40:24.000000000 -0500 -@@ -42,7 +42,7 @@ - rewind (png_file); - if (fread (sigbytes, 1, sizeof(sigbytes), png_file) != - sizeof(sigbytes) || -- (!png_check_sig (sigbytes, sizeof(sigbytes)))) -+ (png_sig_cmp (sigbytes, 0, sizeof(sigbytes)))) - return 0; - else - return 1; -diff -aur tetex-src-3.0/texk/dvipdfm/thumbnail.c tetex-src-3.0-2/texk/dvipdfm/thumbnail.c ---- tetex-src-3.0/texk/dvipdfm/thumbnail.c 2002-12-25 11:51:16.000000000 -0600 -+++ tetex-src-3.0-2/texk/dvipdfm/thumbnail.c 2010-05-06 10:41:42.000000000 -0500 -@@ -79,7 +79,7 @@ - } - if (fread (sigbytes, 1, sizeof(sigbytes), thumb_file) != - sizeof(sigbytes) || -- (!png_check_sig (sigbytes, sizeof(sigbytes)))) { -+ (png_sig_cmp (sigbytes, 0, sizeof(sigbytes)))) { - fprintf (stderr, "\nThumbnail not a png file! Skipping\n"); - return NULL; - } diff --git a/source/xapps-extra/tetex/tetex.install b/source/xapps-extra/tetex/tetex.install deleted file mode 100644 index dac7cf7..0000000 --- a/source/xapps-extra/tetex/tetex.install +++ /dev/null @@ -1,25 +0,0 @@ -post_install() { - echo "Creating ls-R database with mktexlsr..." - /usr/bin/mktexlsr - echo "generating the top-level Info node... " - mkinfodir /usr/share/info > /usr/share/info/dir 2>/dev/null -} - -post_upgrade() { - echo "Creating ls-R database with mktexlsr..." - /usr/bin/mktexlsr - echo "generating the top-level Info node... " - mkinfodir /usr/share/info > /usr/share/info/dir 2>/dev/null -} - -post_remove() -{ - rm /usr/share/texmf/doc/haltp.* /usr/share/texmf/web2c/latex.fmt /usr/share/texmf/web2c/latex.log &>/dev/null - echo "generating the top-level Info node... " - mkinfodir /usr/share/info > /usr/share/info/dir 2>/dev/null - -} - -op=$1 -shift -$op $* diff --git a/source/xapps-extra/tetex/texlive-CVE-2010-0739-int-overflow.patch b/source/xapps-extra/tetex/texlive-CVE-2010-0739-int-overflow.patch deleted file mode 100644 index 83af28a..0000000 --- a/source/xapps-extra/tetex/texlive-CVE-2010-0739-int-overflow.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up texlive-2007/texk/dvipsk/dospecial.c.int_overflow texlive-2007/texk/dvipsk/dospecial.c ---- texlive-2007/texk/dvipsk/dospecial.c.int_overflow 2006-12-07 23:39:19.000000000 +0100 -+++ texlive-2007/texk/dvipsk/dospecial.c 2010-03-12 14:45:04.000000000 +0100 -@@ -326,6 +326,10 @@ void predospecial P2C(integer, numbytes, - static int omega_specials = 0; - - if (nextstring + numbytes > maxstring) { -+ if (numbytes < 0 || (numbytes > 0 && 2 > INT_MAX / numbytes) || 2 * numbytes > 1000 + 2 * numbytes) { -+ error("! Integer overflow"); -+ exit(1); -+ } - p = nextstring = mymalloc(1000 + 2 * numbytes) ; - maxstring = nextstring + 2 * numbytes + 700 ; - } _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
