use the latest patches form the authors website

This commit is contained in:
rohee 1999-04-22 19:05:08 +00:00
parent 1a906e6713
commit f0c14b88d6
3 changed files with 116 additions and 56 deletions

View File

@ -3,7 +3,7 @@
# Date created: 1998-Mar-20
# Whom: marc@OpenBSD.ORG
#
# $OpenBSD: Makefile,v 1.4 1998/06/14 08:10:40 marc Exp $
# $OpenBSD: Makefile,v 1.5 1999/04/22 19:05:08 rohee Exp $
#
DISTNAME= xv-3.10a
@ -26,10 +26,16 @@ PATCHFILES= xv-3.10a.JPEG-patch xv-3.10a.TIFF-patch
# Various patches from the XV author's site
#
PATCH_SITES+= ftp://ftp.trilon.com/pub/xv/patches/
PATCHFILES+= grabpatch vispatch mp-tiff-patch
# (xpm.patch is integrated in xvpng.diff that is in xv-3.10a-png-1.2d.tar.gz)
# longname.patch is integrated in patches/patch-aj
MAINTAINER= ports@OpenBSD.ORG
PATCH_SITES+= ftp://ftp.trilon.com/pub/xv/patches/
PATCHFILES+= deepcolor.patch gifpatch grabpatch \
mp-tiff-patch pdf.patch vispatch xvpng-fix2.patch
MAINTAINER= rohee@OpenBSD.ORG
HOMEPAGE=http://www.trilon.com/xv/index.html
LIB_DEPENDS= jpeg\\.62\\.:${PORTSDIR}/graphics/jpeg \
tiff\\.3\\.4:${PORTSDIR}/graphics/tiff34 \
@ -40,8 +46,8 @@ USE_IMAKE= yes
pre-patch:
@${PATCH} ${PATCH_ARGS} -p1 < ${WRKDIR}/xcmap.diff
@${PATCH} ${PATCH_ARGS} -p1 < ${WRKDIR}/xvpng.diff
@${CP} ${WRKDIR}/xvpng.c ${WRKSRC}
@${CP} ${WRKDIR}/bits/br_png ${WRKSRC}/bits
@${MV} ${WRKDIR}/xvpng.c ${WRKSRC}
@${MV} ${WRKDIR}/bits/br_png ${WRKSRC}/bits
post-install:
${MKDIR} ${PREFIX}/share/doc/xv

View File

@ -1,21 +1,33 @@
MD5 (xv-3.10a/deepcolor.patch) = bc81180d9e9dce234d092ff4334cafc0
MD5 (xv-3.10a/gifpatch) = 476a786f60fee70812a4b59588db2049
MD5 (xv-3.10a/grabpatch) = fd9b9e735a1ed68e3792d904f1df422a
MD5 (xv-3.10a/mp-tiff-patch) = acc754bea43bf957c37d2df293ed41e7
MD5 (xv-3.10a/pdf.patch) = f057517331a6cb9b231c828d57514295
MD5 (xv-3.10a/vispatch) = 4bc978d266bf1af9e29e8f21fc21e9d7
MD5 (xv-3.10a/xv-3.10a-png-1.2d.tar.gz) = c8cbe14db6e2104ed4eb5330cdaba420
MD5 (xv-3.10a/xv-3.10a.JPEG-patch) = bd3ac79fa805319f583ccd382bdc825d
MD5 (xv-3.10a/xv-3.10a.TIFF-patch) = 305f2f0273368bb6e029c3f212a14249
MD5 (xv-3.10a/xv-3.10a.tar.gz) = 2d4fbeec1561304362781cc8e2f7f72d
MD5 (xv-3.10a/xvpng-fix2.patch) = 672f2f82c94828d91b6929ed87139937
RMD160 (xv-3.10a/deepcolor.patch) = 27dbaf4e159a5d5c74643ffbd83db8d3bfc17ee1
RMD160 (xv-3.10a/gifpatch) = 5c7152b8fb7ebf42c2501808d944044dd5d2e263
RMD160 (xv-3.10a/grabpatch) = b05b957f8a4a8b32c2325c023a82e145cdcab101
RMD160 (xv-3.10a/mp-tiff-patch) = cfa30baa3e32b965fe60ab85a47cf5668c479ec1
RMD160 (xv-3.10a/pdf.patch) = 469d456554b73d4c5f75b32eb6d542e163a9a45e
RMD160 (xv-3.10a/vispatch) = 33928eb4c5a21bb4a01572df661518c8ea8f4112
RMD160 (xv-3.10a/xv-3.10a-png-1.2d.tar.gz) = 5ff43920962ddbeca9bbbb14dd7fdc59c284002f
RMD160 (xv-3.10a/xv-3.10a.JPEG-patch) = f69cb0c07c116fbcec58678bcba1b5ef96cb7e62
RMD160 (xv-3.10a/xv-3.10a.TIFF-patch) = 4c09609558f1b93a67cae2abaf14462208dd850b
RMD160 (xv-3.10a/xv-3.10a.tar.gz) = 7d545e0c0e5b0120a7d026ea549cba19a53fbc0d
RMD160 (xv-3.10a/xvpng-fix2.patch) = 755232e0328faebdb0c95728691ffd6f3fb2539a
SHA1 (xv-3.10a/deepcolor.patch) = a2090f8be004d6ae10e2d1ee09c47a44270b2bb7
SHA1 (xv-3.10a/gifpatch) = 2bc19d64dc426521746fa964bd9164f74ccf6d37
SHA1 (xv-3.10a/grabpatch) = 0a9354b8649db991e57313f6844788236dc6dd22
SHA1 (xv-3.10a/mp-tiff-patch) = afe0c638470b9a78f22327f64564d139d734ecf3
SHA1 (xv-3.10a/pdf.patch) = 79794af437c37df53e0ca9669f944772803dc46e
SHA1 (xv-3.10a/vispatch) = 0efe40c451319b9f20ee3358277c216230b0de23
SHA1 (xv-3.10a/xv-3.10a-png-1.2d.tar.gz) = cd824fc8c5e15d609b09c04b6c924ad656321e93
SHA1 (xv-3.10a/xv-3.10a.JPEG-patch) = 05d0de5a3c4babc36f867247e1920eca6b9e9ff0
SHA1 (xv-3.10a/xv-3.10a.TIFF-patch) = 5e1ce5610a83a88d5878eefe175352a4cc2aa21c
SHA1 (xv-3.10a/xv-3.10a.tar.gz) = 9e6372f154be9e9e355972cbeb91d98d9c342474
SHA1 (xv-3.10a/xvpng-fix2.patch) = 3712d6e5a5a56afe286637faf22b86f3ba690f39

View File

@ -1,50 +1,92 @@
*** xvdir.c.orig Tue Jan 3 16:21:39 1995
--- xvdir.c Sat Apr 25 20:13:32 1998
***************
*** 1596,1608 ****
#else
strcpy(outFName, "[]xvXXXXXX.lis");
#endif
! mktemp(outFName);
dopipe = 1;
}
/* see if file exists (ie, we're overwriting) */
! if (stat(outFName, &st)==0) { /* stat succeeded, file must exist */
static char *foo[] = { "\nOk", "\033Cancel" };
char str[512];
--- 1620,1633 ----
#else
strcpy(outFName, "[]xvXXXXXX.lis");
#endif
! fp = fdopen(mkstemp(outFName), "w");
dopipe = 1;
}
/* see if file exists (ie, we're overwriting) */
! if (dopipe == 0 &&
! stat(outFName, &st)==0) { /* stat succeeded, file must exist */
static char *foo[] = { "\nOk", "\033Cancel" };
char str[512];
***************
*** 1612,1618 ****
/* Open file */
! fp = fopen(outFName, "w");
if (!fp) {
char str[512];
sprintf(str,"Can't write file '%s'\n\n %s.",outFName, ERRSTR(errno));
--- 1637,1644 ----
/* Open file */
! if (dopipe == 0)
! fp = fopen(outFName, "w");
if (!fp) {
char str[512];
sprintf(str,"Can't write file '%s'\n\n %s.",outFName, ERRSTR(errno));
$OpenBSD: patch-aj,v 1.2 1999/04/22 19:05:11 rohee Exp $
This patch contains the original patch replacing insecure mktemp()
usage by secure mkstemp() usage in xvdir.c, as well as the Michael
Rausch's patch fixing a string buffer where the program failed to
append '\0'.
See ftp://ftp.trilon.com/pub/xv/patches/longname.patch for the original
patch.
It was less annoying to remake the patch than using his one, since it
isn't ${WRKSRC} relative, and it collides with the original OpenBSD
patch.
--- xvdir.c.reference Wed Apr 21 22:35:43 1999
+++ xvdir.c Wed Apr 21 22:38:14 1999
@@ -1213,6 +1213,7 @@
char *st;
{
strncpy(deffname, st, (size_t) MAXFNLEN-1);
+ deffname[MAXFNLEN-1] = '\0';
setFName(st);
}
@@ -1620,13 +1621,14 @@
#else
strcpy(outFName, "[]xvXXXXXX.lis");
#endif
- mktemp(outFName);
+ fp = fdopen(mkstemp(outFName), "w");
dopipe = 1;
}
/* see if file exists (ie, we're overwriting) */
- if (stat(outFName, &st)==0) { /* stat succeeded, file must exist */
+ if (dopipe == 0 &&
+ stat(outFName, &st)==0) { /* stat succeeded, file must exist */
static char *foo[] = { "\nOk", "\033Cancel" };
char str[512];
@@ -1636,7 +1638,8 @@
/* Open file */
- fp = fopen(outFName, "w");
+ if (dopipe == 0)
+ fp = fopen(outFName, "w");
if (!fp) {
char str[512];
sprintf(str,"Can't write file '%s'\n\n %s.",outFName, ERRSTR(errno));
--- /tmp/xv-3.10a.orig/xvbrowse.c Thu Jan 19 18:49:17 1995
+++ xvbrowse.c Mon Feb 5 23:46:28 1996
@@ -956,6 +956,7 @@
char *str;
{
strncpy(br->dispstr, str, (size_t) 256);
+ br->dispstr[255] = '\0';
drawBrowStr(br);
XFlush(theDisp);
}
@@ -1490,6 +1491,7 @@
if (StringWidth(str) > ISPACE_WIDE-6) {
int dotpos;
strncpy(tmpstr, str, (size_t) 56);
+ tmpstr[56] = '\0'; /* MR: otherwise it dies on long file names */
dotpos = strlen(tmpstr);
strcat(tmpstr,"...");
--- /tmp/xv-3.10a.orig/xvpopup.c Thu Jan 19 19:09:31 1995
+++ xvpopup.c Mon Feb 5 21:50:13 1996
@@ -560,6 +560,7 @@
nams[*lenp] = (char *) malloc((size_t) 32);
if (!nams[*lenp]) { free(vals[*lenp]); continue; }
strncpy(nams[*lenp], vals[*lenp], (size_t) 31);
+ nams[*lenp][31] = '\0';
}
if (strlen(nams[*lenp]) > (size_t) 20) { /* fix long names */
--- /tmp/xv-3.10a.orig/xvtext.c Sat Jan 14 00:46:28 1995
+++ xvtext.c Mon Feb 5 21:50:54 1996
@@ -293,6 +293,7 @@
tv->textlen = len;
tv->freeonclose = freeonclose;
strncpy(tv->title, title, (size_t) TITLELEN-1);
+ tv->title[TITLELEN-1] = '\0';
computeText(tv); /* compute # lines and linestarts array */