aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-01-19 06:27:21 +0800
committermarcus <marcus@FreeBSD.org>2003-01-19 06:27:21 +0800
commite386a78c3c6ad976ba72c3e147a0318cf61f528a (patch)
treee3afd01a89ae74d6ea4d1f9ee919c7f5d9aa0ad4
parent1bf21738f9a96740683eb0bd668610b67b821249 (diff)
downloadfreebsd-ports-gnome-e386a78c3c6ad976ba72c3e147a0318cf61f528a.tar.gz
freebsd-ports-gnome-e386a78c3c6ad976ba72c3e147a0318cf61f528a.tar.zst
freebsd-ports-gnome-e386a78c3c6ad976ba72c3e147a0318cf61f528a.zip
Fix a segfault when XftConfig or ~/.xftconfig contains directories with
gzip'd fonts. The next release of freetype2 will allow building with the system version of zlib, so this won't be an issue. Reported by: alane Obtained from: FreeType CVS and /usr/src/lib/libz/infcodes.c Approved by: maintainer
-rw-r--r--print/freetype2/Makefile1
-rw-r--r--print/freetype2/files/patch-src_gzip_ftgzip.c20
-rw-r--r--print/freetype2/files/patch-src_gzip_infcodes.c13
3 files changed, 34 insertions, 0 deletions
diff --git a/print/freetype2/Makefile b/print/freetype2/Makefile
index 2b2f08cfdd24..fcab163e18e8 100644
--- a/print/freetype2/Makefile
+++ b/print/freetype2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= freetype2
PORTVERSION= 2.1.3
+PORTREVISION= 1
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S,%SUBDIR%,freetype,} \
http://sunsite.cnlab-switch.ch/ftp/mirror/freetype/%SUBDIR%/ \
diff --git a/print/freetype2/files/patch-src_gzip_ftgzip.c b/print/freetype2/files/patch-src_gzip_ftgzip.c
new file mode 100644
index 000000000000..260fa8e479b3
--- /dev/null
+++ b/print/freetype2/files/patch-src_gzip_ftgzip.c
@@ -0,0 +1,20 @@
+--- src/gzip/ftgzip.c.orig Sat Jan 18 13:04:29 2003
++++ src/gzip/ftgzip.c Sat Jan 18 13:04:40 2003
+@@ -177,7 +177,7 @@
+ (void)FT_STREAM_SKIP( 6 );
+
+ /* skip the extra field */
+- if ( head[3] && FT_GZIP_EXTRA_FIELD )
++ if ( head[3] & FT_GZIP_EXTRA_FIELD )
+ {
+ FT_UInt len;
+
+@@ -187,7 +187,7 @@
+ }
+
+ /* skip original file name */
+- if ( head[3] && FT_GZIP_ORIG_NAME )
++ if ( head[3] & FT_GZIP_ORIG_NAME )
+ for (;;)
+ {
+ FT_UInt c;
diff --git a/print/freetype2/files/patch-src_gzip_infcodes.c b/print/freetype2/files/patch-src_gzip_infcodes.c
new file mode 100644
index 000000000000..c8d8f911f1ff
--- /dev/null
+++ b/print/freetype2/files/patch-src_gzip_infcodes.c
@@ -0,0 +1,13 @@
+--- src/gzip/infcodes.c.orig Sat Jan 18 15:44:46 2003
++++ src/gzip/infcodes.c Sat Jan 18 15:46:10 2003
+@@ -196,8 +196,8 @@
+ c->mode = COPY;
+ case COPY: /* o: copying bytes in window, waiting for space */
+ f = q - c->sub.copy.dist;
+- while (f < s->window) /* modulo window size-"while" instead */
+- f += s->end - s->window; /* of "if" handles invalid distances */
++ if ((uInt)(q - s->window) < c->sub.copy.dist)
++ f = s->end - (c->sub.copy.dist - (uInt)(q - s->window));
+ while (c->len)
+ {
+ NEEDOUT