Skip site navigation (1)Skip section navigation (2)
Date:      21 May 2006 14:10:12 -0000
From:      "Aho K.F.Li" <thinker@branda.to>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/97559: py24-freetype is broken with CJK unicode.
Message-ID:  <20060521141012.28540.qmail@heaven.branda.to>
Resent-Message-ID: <200605211420.k4LEKHjX051572@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         97559
>Category:       ports
>Synopsis:       py24-freetype is broken with CJK unicode.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 21 14:20:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Aho K.F. Li
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
thinker@branda.to
>Environment:
System: FreeBSD heaven 5.2-CURRENT FreeBSD 5.2-CURRENT #4: Thu May 13 22:51:48 CST 2004 root@heaven:/usr/src/sys/i386/compile/heaven i386


	
>Description:
py-freetype is broken when call TT_Char_Index() with charcode bigger
than 0x8000.  Freetype thinks charcode as a unsigned short type, but
py-freetype parses it as signed short type.  Since charcode that bigger
than 0x8000 is out of range of unsigned short, it triger a overflow
exception that should not happen.
	
>How-To-Repeat:
invoke PyFT.TT_Char_Index() with charcode that bigger than 0x8000.
	
>Fix:

apply following patch.
	

--- patch-freetype_wrap.c begins here ---
--- freetype_wrap.c.orig	Sun May 21 15:32:10 2006
+++ freetype_wrap.c	Sun May 21 15:32:36 2006
@@ -3410,7 +3410,7 @@
     PyObject * _argo0 = 0;
 
     self = self;
-    if(!PyArg_ParseTuple(args,"Oh:TT_Char_Index",&_argo0,&_arg1)) 
+    if(!PyArg_ParseTuple(args,"OH:TT_Char_Index",&_argo0,&_arg1)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
--- patch-freetype_wrap.c ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060521141012.28540.qmail>