Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jul 2005 03:35:47 +0900
From:      MANTANI Nobutaka <nobutaka@FreeBSD.org>
To:        Clive Lin <clive@tongi.org>
Cc:        MANTANI Nobutaka <nobutaka@FreeBSD.org>, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org, Pav Lucistnik <pav@FreeBSD.org>, chinsan <chinsan.tw@gmail.com>, cvs-ports@FreeBSD.org
Subject:   Re: cvs commit: ports/x11-fonts/libXft Makefile distinfo
Message-ID:  <861x5zor24.wl%nobutaka@nobutaka.org>
In-Reply-To: <20050715154253.GA2568@tongi.org>
References:  <200507141313.j6EDDrox078811@repoman.freebsd.org> <86vf3cce58.wl%nobutaka@nobutaka.org> <20050715154253.GA2568@tongi.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At Fri, 15 Jul 2005 23:42:53 +0800,
Clive Lin wrote:
> 
> Uhm, stay tuned. It's not yet proven right.

I have found a null pointer dereference bug in the CJK patch.
It causes segmentation fault in the startup of firefox (aagh!).
The following patch fixes it.


Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/x11-fonts/libXft/Makefile,v
retrieving revision 1.32
diff -u -r1.32 Makefile
--- Makefile	15 Jul 2005 15:40:37 -0000	1.32
+++ Makefile	15 Jul 2005 18:25:27 -0000
@@ -30,6 +30,7 @@
 PATCH_SITES=	ftp://local-distfiles.freebsd.org.cn/pub/china-ports/hamigua/ \
 		http://bsdchat.com/dist/firefly-cjk-patchset/
 PATCHFILES+=	cjk-patch-libXft-20050715.diff.gz
+EXTRA_PATCHES=	${PATCHDIR}/extra-patch-xftglyphs.c
 .endif
 
 .include <bsd.port.pre.mk>
Index: files/extra-patch-xftglyphs.c
===================================================================
RCS file: files/extra-patch-xftglyphs.c
diff -N files/extra-patch-xftglyphs.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/extra-patch-xftglyphs.c	15 Jul 2005 18:25:27 -0000
@@ -0,0 +1,26 @@
+--- xftglyphs.c.orig	Sat Jul 16 02:57:30 2005
++++ xftglyphs.c	Sat Jul 16 02:57:44 2005
+@@ -127,6 +127,11 @@
+     if (!info)
+ 	return;
+ 
++    face = XftLockFace (&font->public);
++    
++    if (!face)
++	return;
++
+     /*-------------------------------------------------------
+      * Add by Firefly (firefly@firefly.idv.tw)
+      * Initialize gamma table
+@@ -141,11 +146,6 @@
+     if (font->info.weight >= FC_WEIGHT_BOLD &&
+ 	!(face->style_flags & FT_STYLE_FLAG_BOLD))
+ 	bold_advance_width = 64;
+-
+-    face = XftLockFace (&font->public);
+-    
+-    if (!face)
+-	return;
+ 
+     matrix.xx = matrix.yy = 0x10000L;
+     matrix.xy = matrix.yx = 0;
 


--
MANTANI Nobutaka
nobutaka@nobutaka.org, nobutaka@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?861x5zor24.wl%nobutaka>