summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Stelling <blubb@gentoo.org>2006-01-28 21:05:07 +0000
committerSimon Stelling <blubb@gentoo.org>2006-01-28 21:05:07 +0000
commit5a55203570b5a746e2ef621a3dfd112ec3927661 (patch)
treefe70822a5680b8a16513ef5260f11df268819700 /media-gfx
parentversion bump (diff)
downloadgentoo-2-5a55203570b5a746e2ef621a3dfd112ec3927661.tar.gz
gentoo-2-5a55203570b5a746e2ef621a3dfd112ec3927661.tar.bz2
gentoo-2-5a55203570b5a746e2ef621a3dfd112ec3927661.zip
no need to bzip smallish patches
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/xv/ChangeLog10
-rw-r--r--media-gfx/xv/files/xv-3.10a-bmpfix.patch133
-rw-r--r--media-gfx/xv/files/xv-3.10a-bmpfix.patch.bz2bin1249 -> 0 bytes
-rw-r--r--media-gfx/xv/files/xv-3.10a-yaos.dif.bz2bin4212 -> 0 bytes
-rw-r--r--media-gfx/xv/files/xv-3.10a-yaos.diff471
-rw-r--r--media-gfx/xv/xv-3.10a-r11.ebuild8
6 files changed, 616 insertions, 6 deletions
diff --git a/media-gfx/xv/ChangeLog b/media-gfx/xv/ChangeLog
index b044916cdc1e..a7d35d729965 100644
--- a/media-gfx/xv/ChangeLog
+++ b/media-gfx/xv/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-gfx/xv
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/ChangeLog,v 1.75 2005/12/13 15:52:49 spyderous Exp $
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/ChangeLog,v 1.76 2006/01/28 21:05:07 blubb Exp $
+
+ 28 Jan 2006; Simon Stelling <blubb@gentoo.org>
+ +files/xv-3.10a-bmpfix.patch, -files/xv-3.10a-bmpfix.patch.bz2,
+ -files/xv-3.10a-yaos.dif.bz2, +files/xv-3.10a-yaos.diff,
+ xv-3.10a-r11.ebuild:
+ no need to bzip smallish patches
13 Dec 2005; Donnie Berkholz <spyderous@gentoo.org>; xv-3.10a-r12.ebuild:
Add modular X dependencies.
diff --git a/media-gfx/xv/files/xv-3.10a-bmpfix.patch b/media-gfx/xv/files/xv-3.10a-bmpfix.patch
new file mode 100644
index 000000000000..fabaa63e57dd
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-bmpfix.patch
@@ -0,0 +1,133 @@
+--- xv-3.10a/xvbmp.c
++++ xv-3.10a/xvbmp.c Mon Apr 11 18:45:16 2005
+@@ -190,14 +190,12 @@
+ bPad -= 12;
+ }
+
+- /* load up colormap, if any */
+- if (biBitCount==1 || biBitCount==4 || biBitCount==8) {
+- int i, cmaplen;
+-
+-/* this is superfluous; see identical test in "error checking" block above
+ if (biClrUsed > (1 << biBitCount))
+ biClrUsed = (1 << biBitCount);
+- */
++
++ /* load up colormap, if any */
++ if (biBitCount == 1 || biBitCount == 4 || biBitCount == 8) {
++ int i, cmaplen;
+
+ cmaplen = (biClrUsed) ? biClrUsed : 1 << biBitCount;
+ for (i=0; i<cmaplen; i++) {
+@@ -343,12 +341,13 @@
+ u_int w,h;
+ {
+ int i,j,c,bitnum,padw;
+- byte *pp;
++ byte *pp = pic8 + ((h - 1) * w);
++ size_t l = w*h;
+
+ c = 0;
+ padw = ((w + 31)/32) * 32; /* 'w', padded to be a multiple of 32 */
+
+- for (i=h-1; i>=0; i--) {
++ for (i=h-1; i>=0 && (pp - pic8 <= l); i--) {
+ pp = pic8 + (i * w);
+ if ((i&0x3f)==0) WaitCursor();
+ for (j=bitnum=0; j<padw; j++,bitnum++) {
+@@ -377,8 +376,8 @@
+ u_int w,h,comp;
+ {
+ int i,j,c,c1,x,y,nybnum,padw,rv;
+- byte *pp;
+-
++ byte *pp = pic8 + ((h - 1) * w);
++ size_t l = w*h;
+
+ rv = 0;
+ c = c1 = 0;
+@@ -386,7 +385,7 @@
+ if (comp == BI_RGB) { /* read uncompressed data */
+ padw = ((w + 7)/8) * 8; /* 'w' padded to a multiple of 8pix (32 bits) */
+
+- for (i=h-1; i>=0; i--) {
++ for (i=h-1; i>=0 && (pp - pic8 <= l); i--) {
+ pp = pic8 + (i * w);
+ if ((i&0x3f)==0) WaitCursor();
+
+@@ -414,7 +413,7 @@
+
+ if (c) { /* encoded mode */
+ c1 = getc(fp);
+- for (i=0; i<c; i++,x++,pp++)
++ for (i=0; i<c && (pp - pic8 <= l); i++,x++,pp++)
+ *pp = (i&1) ? (c1 & 0x0f) : ((c1>>4)&0x0f);
+ }
+
+@@ -434,7 +433,7 @@
+ }
+
+ else { /* absolute mode */
+- for (i=0; i<c; i++, x++, pp++) {
++ for (i=0; i<c && (pp - pic8 <= l); i++, x++, pp++) {
+ if ((i&1) == 0) c1 = getc(fp);
+ *pp = (i&1) ? (c1 & 0x0f) : ((c1>>4)&0x0f);
+ }
+@@ -463,7 +462,9 @@
+ u_int w,h,comp;
+ {
+ int i,j,c,c1,padw,x,y,rv;
+- byte *pp, *pend;
++ byte *pp = pic8 + ((h - 1) * w);
++ size_t l = w*h;
++ byte *pend;
+
+ rv = 0;
+
+@@ -472,7 +473,7 @@
+ if (comp == BI_RGB) { /* read uncompressed data */
+ padw = ((w + 3)/4) * 4; /* 'w' padded to a multiple of 4pix (32 bits) */
+
+- for (i=h-1; i>=0; i--) {
++ for (i=h-1; i>=0 && (pp - pic8 <= l); i--) {
+ pp = pic8 + (i * w);
+ if ((i&0x3f)==0) WaitCursor();
+
+@@ -541,7 +542,8 @@
+ u_int w, h, *mask;
+ {
+ int x, y;
+- byte *pp;
++ byte *pp = pic24 + ((h - 1) * w * 3);
++ size_t l = w*h*3;
+ u_int buf, colormask[6];
+ int i, bit, bitshift[6], colorbits[6], bitshift2[6];
+
+@@ -611,7 +613,7 @@
+ colorbits[2], colormask[2], bitshift[2], bitshift2[2],
+ colormask[5], bitshift[5], bitshift2[5]);
+
+- for (y = h-1; y >= 0; y--) {
++ for (y = h-1; y >= 0 && (pp - pic24 <= l); y--) {
+ pp = pic24 + (3 * w * y);
+ if ((y&0x3f)==0) WaitCursor();
+
+@@ -644,7 +646,8 @@
+ u_int w,h, bits;
+ {
+ int i,j,padb,rv;
+- byte *pp;
++ byte *pp = pic24 + ((h - 1) * w * 3);
++ size_t l = w*h*3;
+
+ rv = 0;
+
+@@ -655,7 +658,7 @@
+ pp = pic24 + (i * w * 3);
+ if ((i&0x3f)==0) WaitCursor();
+
+- for (j=0; j<w; j++) {
++ for (j=0; j<w && (pp - pic24 <= l); j++) {
+ pp[2] = getc(fp); /* blue */
+ pp[1] = getc(fp); /* green */
+ pp[0] = getc(fp); /* red */
diff --git a/media-gfx/xv/files/xv-3.10a-bmpfix.patch.bz2 b/media-gfx/xv/files/xv-3.10a-bmpfix.patch.bz2
deleted file mode 100644
index c51897e3f945..000000000000
--- a/media-gfx/xv/files/xv-3.10a-bmpfix.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/media-gfx/xv/files/xv-3.10a-yaos.dif.bz2 b/media-gfx/xv/files/xv-3.10a-yaos.dif.bz2
deleted file mode 100644
index 07eedade3a4c..000000000000
--- a/media-gfx/xv/files/xv-3.10a-yaos.dif.bz2
+++ /dev/null
Binary files differ
diff --git a/media-gfx/xv/files/xv-3.10a-yaos.diff b/media-gfx/xv/files/xv-3.10a-yaos.diff
new file mode 100644
index 000000000000..5157a65ea523
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-yaos.diff
@@ -0,0 +1,471 @@
+--- xvbrowse.c
++++ xvbrowse.c Wed Apr 13 15:35:17 2005
+@@ -5309,7 +5309,51 @@
+ SetCursors(-1);
+ }
+
++static int recursive_remove(dir)
++ char *dir;
++{
++ DIR *dp = NULL;
++ struct dirent *di;
++ char name[MAXPATHLEN+1];
++
++ strncpy(name, dir, MAXPATHLEN);
++ name[MAXPATHLEN] = 0;
++
++ if (name[strlen(name) - 1] == '/')
++ name[strlen(name) - 1] = 0;
++
++ if ((dp = opendir(name)) == NULL)
++ goto err;
++
++ while ((di = readdir(dp)) != NULL) {
++ char buf[MAXPATHLEN+1];
++ struct stat st;
++
++ if (!strcmp(di->d_name, ".") || !strcmp(di->d_name, ".."))
++ continue;
++
++ snprintf(buf, MAXPATHLEN, "%s/%s", name, di->d_name);
++
++ if (stat(buf, &st) < 0)
++ continue;
++
++ if (S_ISDIR(st.st_mode)) {
++ if (recursive_remove(buf) < 0)
++ goto err;
++ } else
++ unlink(buf);
++ }
++
++ if (rmdir(name) < 0)
++ goto err;
+
++ closedir(dp);
++ return 0;
++
++err:
++ if (dp) closedir(dp);
++ return -1;
++}
+
+ /*************************************************/
+ static int moveFile(src,dst)
+@@ -5352,7 +5396,7 @@
+ #endif
+
+ if (overwrite==OWRT_ASK) {
+- sprintf(buf, "%s '%s' exists.\n\nOverwrite?",
++ snprintf(buf, sizeof(buf), "%s '%s' exists.\n\nOverwrite?",
+ dstdir ? "Directory" : "File", dst);
+ i = PopUp(buf, owbuts, 4);
+
+@@ -5363,8 +5407,7 @@
+
+ if (dstdir) {
+ #ifndef VMS /* we don't delete directories in VMS */
+- sprintf(buf, "rm -rf %s", dst);
+- if (system(buf)) { /* okay, so it's cheating... */
++ if (recursive_remove(dst)) { /* okay, so it's cheating... */
+ SetISTR(ISTR_WARNING, "Unable to remove directory %s", dst);
+ return 1;
+ }
+@@ -5387,9 +5430,8 @@
+ if (i == 0) { /* copied okay, kill the original */
+ if (srcdir) {
+ #ifndef VMS /* we don't delete directories in VMS */
+- sprintf(buf, "rm -rf %s", src);
+- if (system(buf)) { /* okay, so it's cheating... */
+- SetISTR(ISTR_WARNING, "Unable to remove directory %s", dst);
++ if (recursive_remove(src)) { /* okay, so it's cheating... */
++ SetISTR(ISTR_WARNING, "Unable to remove directory %s", src);
+ return 1;
+ }
+ #endif /* VMS */
+--- xvpds.c
++++ xvpds.c Wed Apr 13 15:01:24 2005
+@@ -77,8 +77,7 @@
+ * Huffman-encoded, and the encoding histogram follows the ASCII headers.
+ * To decode these, we use a slightly modified version of "vdcomp.c" from the
+ * NASA Viking CD-ROMS. For xv to work, you need to have vdcomp compiled
+- * and in your search path. vdcomp.c should be included with this
+-distribution.
++ * and in your search path. vdcomp.c should be included with this distribution.
+ *
+ * I've heard that newer discs have FITS images on them. If they do, support
+ * for them will be added when I get one. Until then, you can use fitstopgm.
+@@ -129,27 +128,32 @@
+
+ /* This is arbitrary. Everything I've seen so far fits in 50 chars */
+ #define COMMENTSIZE 50
++#define INOTESIZE 1000
+
+
+ static int lastwasinote = FALSE;
+-static char scanbuff [MAX_SIZE],
+- rtbuff [RTBUFFSIZE],
+- inote [20*COMMENTSIZE],
+- infobuff [COMMENTSIZE],
+- spacecraft [COMMENTSIZE],
+- target [COMMENTSIZE],
+- filtname [COMMENTSIZE],
+- gainmode [COMMENTSIZE],
+- editmode [COMMENTSIZE],
+- scanmode [COMMENTSIZE],
+- exposure [COMMENTSIZE],
+- shuttermode [COMMENTSIZE],
+- mphase [COMMENTSIZE],
+- iname [COMMENTSIZE],
+- itime [COMMENTSIZE],
+- garbage [1020],
++static char scanbuff [MAX_SIZE+1],
++ rtbuff [RTBUFFSIZE+1],
++ inote [INOTESIZE+1],
++ infobuff [COMMENTSIZE+1],
++ spacecraft [COMMENTSIZE+1],
++ target [COMMENTSIZE+1],
++ filtname [COMMENTSIZE+1],
++ gainmode [COMMENTSIZE+1],
++ editmode [COMMENTSIZE+1],
++ scanmode [COMMENTSIZE+1],
++ exposure [COMMENTSIZE+1],
++ shuttermode [COMMENTSIZE+1],
++ mphase [COMMENTSIZE+1],
++ iname [COMMENTSIZE+1],
++ itime [COMMENTSIZE+1],
++ garbage [1024],
+ *tmptmp,
+ pdsuncompfname[FNAMESIZE];
++
++#define SSTR(l) "%" #l "s"
++#define S(l) SSTR(l)
++
+ byte *image;
+ static int elaphe;
+
+@@ -397,7 +401,7 @@
+
+ if (strcmp(scanbuff,"END") == 0) {
+ break;
+- } else if (sscanf(scanbuff," RECORD_TYPE = %s",rtbuff) == 1) {
++ } else if (sscanf(scanbuff, " RECORD_TYPE = " S(RTBUFFSIZE), rtbuff) == 1) {
+ if (strncmp(rtbuff,"VARIABLE_LENGTH", (size_t) 15) == 0) {
+ /* itype=PDSVARIABLE; */
+ } else if (strncmp(rtbuff,"FIXED_LENGTH", (size_t) 12) == 0) {
+@@ -416,7 +420,7 @@
+ if (irecsize == 0) irecsize=recsize;
+ lastwasinote=FALSE;
+ continue;
+- } else if (sscanf(scanbuff," FILE_TYPE = %s", rtbuff) != 0) {
++ } else if (sscanf(scanbuff, " FILE_TYPE = " S(RTBUFFSIZE), rtbuff) != 0) {
+ lastwasinote=FALSE;
+ if (strncmp(rtbuff,"IMAGE", (size_t) 5) == 0) {
+ isimage=TRUE;
+@@ -445,74 +449,74 @@
+ lastwasinote=FALSE; continue;
+ } else if (sscanf(scanbuff," SAMPLE_BITS = %d", &samplesize) == 1) {
+ lastwasinote=FALSE; continue;
+- } else if (sscanf(scanbuff," SAMPLE_TYPE = %s", sampletype) == 1) {
++ } else if (sscanf(scanbuff, " SAMPLE_TYPE = " S(64), sampletype) == 1) {
+ lastwasinote=FALSE; continue;
+- } else if (sscanf(scanbuff," SPACECRAFT_NAME = %s %s",
++ } else if (sscanf(scanbuff," SPACECRAFT_NAME = " S(COMMENTSIZE) " " S(1023),
+ spacecraft,garbage) == 2 ) {
+- strcat(spacecraft,xv_strstr(scanbuff, spacecraft)+strlen(spacecraft));
++ const char *tmp = xv_strstr(scanbuff, spacecraft) + strlen(spacecraft);
++ strncat(spacecraft, tmp, COMMENTSIZE - strlen(spacecraft));
+ lastwasinote=FALSE; continue;
+- } else if (sscanf(scanbuff," SPACECRAFT_NAME = %s", spacecraft) == 1) {
++ } else if (sscanf(scanbuff, " SPACECRAFT_NAME = " S(COMMENTSIZE), spacecraft) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," TARGET_NAME = %s", target) == 1) {
++ } else if (sscanf(scanbuff, " TARGET_NAME = " S(COMMENTSIZE), target) == 1) {
+ lastwasinote=FALSE; continue;
+- } else if (sscanf(scanbuff," TARGET_BODY = %s", target) == 1) {
++ } else if (sscanf(scanbuff, " TARGET_BODY = " S(COMMENTSIZE), target) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," MISSION_PHASE_NAME = %s", mphase) == 1) {
++ } else if (sscanf(scanbuff, " MISSION_PHASE_NAME = " S(COMMENTSIZE), mphase) == 1) {
+ lastwasinote=FALSE; continue;
+- } else if (sscanf(scanbuff," MISSION_PHASE = %s", mphase) == 1) {
++ } else if (sscanf(scanbuff, " MISSION_PHASE = " S(COMMENTSIZE), mphase) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," INSTRUMENT_NAME = %s", iname) == 1) {
++ } else if (sscanf(scanbuff, " INSTRUMENT_NAME = " S(COMMENTSIZE), iname) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," GAIN_MODE_ID = %s", gainmode) == 1) {
++ } else if (sscanf(scanbuff, " GAIN_MODE_ID = " S(COMMENTSIZE), gainmode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," INSTRUMENT_GAIN_STATE = %s",gainmode)==1) {
++ } else if (sscanf(scanbuff, " INSTRUMENT_GAIN_STATE = " S(COMMENTSIZE), gainmode) ==1 ) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," EDIT_MODE_ID = %s", editmode) == 1) {
++ } else if (sscanf(scanbuff, " EDIT_MODE_ID = " S(COMMENTSIZE), editmode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," INSTRUMENT_EDIT_MODE = %s", editmode)==1) {
++ } else if (sscanf(scanbuff, " INSTRUMENT_EDIT_MODE = " S(COMMENTSIZE), editmode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," SCAN_MODE_ID = %s", scanmode) == 1) {
++ } else if (sscanf(scanbuff, " SCAN_MODE_ID = " S(COMMENTSIZE), scanmode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," INSTRUMENT_SCAN_RATE = %s", scanmode)==1) {
++ } else if (sscanf(scanbuff, " INSTRUMENT_SCAN_RATE = " S(COMMENTSIZE), scanmode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," SHUTTER_MODE_ID = %s", shuttermode) == 1) {
++ } else if (sscanf(scanbuff, " SHUTTER_MODE_ID = " S(COMMENTSIZE), shuttermode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," INSTRUMENT_SHUTTER_MODE = %s",
+- shuttermode) == 1) {
++ } else if (sscanf(scanbuff, " INSTRUMENT_SHUTTER_MODE = " S(COMMENTSIZE), shuttermode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," SCAN_MODE_ID = %s", scanmode) == 1) {
++ } else if (sscanf(scanbuff, " SCAN_MODE_ID = " S(COMMENTSIZE), scanmode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," INSTRUMENT_SCAN_RATE = %s", scanmode)==1) {
++ } else if (sscanf(scanbuff, " INSTRUMENT_SCAN_RATE = " S(COMMENTSIZE), scanmode) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," SPACECRAFT_EVENT_TIME = %s", itime) == 1) {
++ } else if (sscanf(scanbuff, " SPACECRAFT_EVENT_TIME = " S(COMMENTSIZE), itime) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," IMAGE_TIME = %s", itime) == 1) {
++ } else if (sscanf(scanbuff, " IMAGE_TIME = " S(COMMENTSIZE), itime) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," FILTER_NAME = %s", filtname) == 1) {
++ } else if (sscanf(scanbuff, " FILTER_NAME = " S(COMMENTSIZE), filtname) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff," INSTRUMENT_FILTER_NAME = %s",filtname)==1) {
++ } else if (sscanf(scanbuff, " INSTRUMENT_FILTER_NAME = " S(COMMENTSIZE), filtname) == 1) {
+ lastwasinote=FALSE; continue;
+
+- } else if ((sscanf(scanbuff," EXPOSURE_DURATION = %s", exposure) == 1)
+- || (sscanf(scanbuff," INSTRUMENT_EXPOSURE_DURATION = %s",
+- exposure) == 1)) {
++ } else if ((sscanf(scanbuff, " EXPOSURE_DURATION = " S(COMMENTSIZE), exposure) == 1)
++ || (sscanf(scanbuff, " INSTRUMENT_EXPOSURE_DURATION = " S(COMMENTSIZE),
++ exposure)) == 1) {
+ tmptmp = (char *) index(scanbuff,'=');
+ tmptmp++;
+ while((*tmptmp) == ' ')
+@@ -520,10 +524,10 @@
+ strcpy(exposure,tmptmp);
+ lastwasinote=FALSE; continue;
+
+- } else if (sscanf(scanbuff, "NOTE = %s", inote) == 1) {
++ } else if (sscanf(scanbuff, "NOTE = " S(INOTESIZE), inote) == 1) {
+ tmptmp = (char *) index(scanbuff,'='); tmptmp++;
+ while (((*tmptmp) == ' ') || ((*tmptmp) == '"')) tmptmp++;
+- strcpy(inote,tmptmp);
++ strncpy(inote, tmptmp, INOTESIZE - 1);
+ strcat(inote," ");
+
+ /* evil and somewhat risky: A "note" (really, any textual
+@@ -548,7 +552,7 @@
+ } else if (lastwasinote) {
+ tmptmp=scanbuff;
+ while (((*tmptmp) == ' ') || ((*tmptmp) == '"')) tmptmp++;
+- strcat(inote,tmptmp);
++ strncat(inote, tmptmp, INOTESIZE - strlen(inote) - 1);
+ strcat(inote," ");
+ if (index(tmptmp,'"') != NULL)
+ lastwasinote=FALSE;
+@@ -647,27 +651,27 @@
+
+ *infobuff='\0';
+ if (*spacecraft) {
+- strcat(infobuff,spacecraft);
++ strncat(infobuff, spacecraft, sizeof(infobuff) - 1);
+ }
+
+ if (*target) {
+- strcat(infobuff,", ");
+- strcat(infobuff,target);
++ strncat(infobuff, ", ", sizeof(infobuff) - strlen(infobuff) - 1);
++ strncat(infobuff, target, sizeof(infobuff) - strlen(infobuff) - 1);
+ }
+
+ if (*filtname) {
+- strcat(infobuff,", ");
+- strcat(infobuff,filtname);
++ strncat(infobuff, ", ", sizeof(infobuff) - strlen(infobuff) - 1);
++ strncat(infobuff, filtname, sizeof(infobuff) - strlen(infobuff) - 1);
+ }
+
+ if (*itime) {
+- strcat(infobuff,", ");
+- strcat(infobuff,itime);
++ strncat(infobuff, ", ", sizeof(infobuff) - strlen(infobuff) - 1);
++ strncat(infobuff, itime, sizeof(infobuff) - strlen(infobuff) - 1);
+ }
+
+- SetISTR(ISTR_WARNING,infobuff);
++ SetISTR(ISTR_WARNING, "%s", infobuff);
+
+- strcpy(pdsuncompfname,fname);
++ strncpy(pdsuncompfname,fname,sizeof(pdsuncompfname) - 1);
+ ftypstr = "";
+
+ switch (itype) {
+@@ -695,7 +699,7 @@
+ fclose(zf);
+
+ #ifndef VMS
+- sprintf(pdsuncompfname,"%s/xvhuffXXXXXX", tmpdir);
++ snprintf(pdsuncompfname, sizeof(pdsuncompfname) - 1, "%s/xvhuffXXXXXX", tmpdir);
+ #else
+ strcpy(pdsuncompfname,"sys$disk:[]xvhuffXXXXXX");
+ #endif
+@@ -707,7 +711,7 @@
+ #endif
+
+ #ifndef VMS
+- sprintf(scanbuff,"%s %s - 4 >%s",PDSUNCOMP,fname,pdsuncompfname);
++ sprintf(scanbuff,"%s '%s' - 4 > %s", PDSUNCOMP, fname, pdsuncompfname);
+ #else
+ sprintf(scanbuff,"%s %s %s 4",PDSUNCOMP,fname,pdsuncompfname);
+ #endif
+@@ -823,26 +827,26 @@
+ char tmp[256];
+ *(pinfo->comment) = '\0';
+
+- sprintf(tmp, "Spacecraft: %-28sTarget: %-32s\n", spacecraft, target);
+- strcat(pinfo->comment, tmp);
++ sprintf(tmp, "Spacecraft: %-28.28sTarget: %-32.32s\n", spacecraft, target);
++ strncat(pinfo->comment, tmp, 2000 - strlen(pinfo->comment) - 1);
+
+- sprintf(tmp, "Filter: %-32sMission phase: %-24s\n", filtname, mphase);
+- strcat(pinfo->comment, tmp);
++ sprintf(tmp, "Filter: %-32.32sMission phase: %-24.24s\n", filtname, mphase);
++ strncat(pinfo->comment, tmp, 2000 - strlen(pinfo->comment) - 1);
+
+- sprintf(tmp, "Image time: %-28sGain mode: %-29s\n", itime, gainmode);
+- strcat(pinfo->comment, tmp);
++ sprintf(tmp, "Image time: %-28.28sGain mode: %-29.29s\n", itime, gainmode);
++ strncat(pinfo->comment, tmp, 2000 - strlen(pinfo->comment) - 1);
+
+- sprintf(tmp, "Edit mode: %-29sScan mode: %-29s\n", editmode, scanmode);
+- strcat(pinfo->comment, tmp);
++ sprintf(tmp, "Edit mode: %-29.29sScan mode: %-29.29s\n", editmode, scanmode);
++ strncat(pinfo->comment, tmp, 2000 - strlen(pinfo->comment) - 1);
+
+- sprintf(tmp, "Exposure: %-30sShutter mode: %-25s\n", exposure,shuttermode);
+- strcat(pinfo->comment, tmp);
++ sprintf(tmp, "Exposure: %-30.30sShutter mode: %-25.25s\n", exposure,shuttermode);
++ strncat(pinfo->comment, tmp, 2000 - strlen(pinfo->comment) - 1);
+
+- sprintf(tmp, "Instrument: %-28sImage time: %-28s\n", iname, itime);
+- strcat(pinfo->comment, tmp);
++ sprintf(tmp, "Instrument: %-28.28sImage time: %-28.28s\n", iname, itime);
++ strncat(pinfo->comment, tmp, 2000 - strlen(pinfo->comment) - 1);
+
+- sprintf(tmp, "Image Note: %-28s", inote);
+- strcat(pinfo->comment, tmp);
++ sprintf(tmp, "Image Note: %-28.28s", inote);
++ strncat(pinfo->comment, tmp, 2000 - strlen(pinfo->comment) - 1);
+ }
+
+ if (LoadPDSPalette(fname, pinfo)) return 1;
+--- xvps.c
++++ xvps.c Wed Apr 13 15:01:24 2005
+@@ -1561,7 +1561,8 @@
+ the first one is loaded (but not deleted) */
+
+ #ifdef GS_PATH
+- char tmp[512], gscmd[512], cmdstr[512], tmpname[64];
++ #define CMDSIZE 1024
++ char tmp[512], gscmd[512], cmdstr[CMDSIZE], tmpname[64];
+ int gsresult, nump, i, filetype, doalert, epsf;
+ #endif
+
+@@ -1733,32 +1734,48 @@
+
+ /******************************************************************/
+ #ifdef GS_PATH
+-void buildCmdStr(str, gscmd, fname, quick, epsf)
+- char *str, *gscmd, *fname;
++void buildCmdStr(str, gscmd, xname, quick, epsf)
++ char *str, *gscmd, *xname;
+ int quick, epsf;
+ {
+ /* note 'epsf' set only on files that don't have a showpage cmd */
++ char *x, *y, *fname;
++
++ x = (char *) malloc((5 * strlen(xname))+3);
++ if (!x)
++ FatalError("malloc failure in xvps.c buildCmdStr");
++ fname = x;
++ *x++ = 0x27;
++
++ for (y = xname; *y; ++y) {
++ if (0x27 == *y) {
++ strcpy(x, "'\"'\"'");
++ x += strlen(x);
++ } else *x++ = *y;
++ }
++ strcpy (x, "'");
+
+ #ifndef VMS
+
+- if (epsf) sprintf(str, "echo '\n showpage ' | cat '%s' - | %s -",
++ if (epsf) snprintf(str, CMDSIZE, "echo '\n showpage ' | cat %s - | %s -",
+ fname, gscmd);
+
+- else if (quick) sprintf(str, "echo '%s' | cat - '%s' | %s -",
++ else if (quick) snprintf(str, CMDSIZE, "echo %s | cat - %s | %s -",
+ "/showpage { showpage quit } bind def",
+ fname, gscmd);
+
+- else sprintf(str, "%s -- %s", gscmd, fname);
++ else snprintf(str, CMDSIZE, "%s -- %s", gscmd, fname);
+
+ #else /* VMS */
+ /* VMS doesn't have pipes or an 'echo' command and GS doesn't like
+- Unix-style file names as input files in the VMS version */
++ Unix-style file fnames as input files in the VMS version */
+ strcat(tmp, " -- ");
+ rld = strrchr(fname, '/'); /* Pointer to last '/' */
+ if (rld) rld++; /* Pointer to filename */
+ else rld = fname; /* No path - use original string */
+ strcat(tmp, rld);
+ #endif /* VMS */
++ free(fname);
+ }
+ #endif /* GS_PATH */
+
+--- xvtiff.c
++++ xvtiff.c Wed Apr 13 15:01:24 2005
+@@ -512,7 +512,7 @@
+ vsprintf(cp, fmt, ap);
+ strcat(cp, ".");
+
+- SetISTR(ISTR_WARNING,buf);
++ SetISTR(ISTR_WARNING, "%s", buf);
+
+ error_occurred = 1;
+ }
+@@ -536,7 +536,7 @@
+ vsprintf(cp, fmt, ap);
+ strcat(cp, ".");
+
+- SetISTR(ISTR_WARNING,buf);
++ SetISTR(ISTR_WARNING, "%s", buf);
+ }
+
+
diff --git a/media-gfx/xv/xv-3.10a-r11.ebuild b/media-gfx/xv/xv-3.10a-r11.ebuild
index 29978e673d9b..683027261e9b 100644
--- a/media-gfx/xv/xv-3.10a-r11.ebuild
+++ b/media-gfx/xv/xv-3.10a-r11.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/xv-3.10a-r11.ebuild,v 1.13 2005/07/12 04:31:46 geoman Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/xv-3.10a-r11.ebuild,v 1.14 2006/01/28 21:05:07 blubb Exp $
inherit flag-o-matic eutils toolchain-funcs
@@ -28,8 +28,8 @@ src_unpack() {
epatch ${WORKDIR}/${P}-jumbo-enh-patch-${JUMBOV}.txt || die
# various security issues.
- epatch ${FILESDIR}/${P}-bmpfix.patch.bz2 || die
- epatch ${FILESDIR}/${P}-yaos.dif.bz2 || die
+ epatch ${FILESDIR}/${P}-bmpfix.patch || die
+ epatch ${FILESDIR}/${P}-yaos.diff || die
if use ppc-macos; then
epatch ${FILESDIR}/${PF}-xv-osx.patch