[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] Some odd problems, fixed
From: |
Shish |
Subject: |
[Freetype] Some odd problems, fixed |
Date: |
Mon, 3 May 2004 14:33:12 -0700 (PDT) |
I've been having freetype crashes constantly, to the point where no freetype
based apps or libraries (GTK2, QT3) work. After a couple of months of being
limted to GTK1 apps, I did some investigation and hacking about, and got
freetype to work by adding some sanity ckecks.
Below are my changes - they aren't in proper patch format, they don't use your
indent style, and they're for 2.1.4 (2.1.8 is current, I think, but the gentoo
portage entry is a bit slow. Also - I've been using the vanilla freetype, not a
gentoo-ised version. Looking in the CVS it seems my fixes still apply anyway).
But anyway - I'd be very happy if you could add my changes in somehow, so that
next time I update my libraries, I won't have to add them in manually all over
again.
-- Shish
PS. Just looking at this again, it was a bit hacky, so I cleaned it up - but I
haven't checked the cleaned up version. The idea works, and is obvious, even if
I broke the syntax :/
==============================================================================
ftutil.c: ~120:
FT_BASE_DEF( void )
FT_Free( FT_Memory memory, void** P ) {
FT_TRACE7(( "FT_Free:" ));
FT_TRACE7(( " Freeing block 0x%08p, ref 0x%08p\n", P, P ? *P : (void*)0 ));
/*
* The func was getting called with P = 0x4, which isn't null, but
* isn't a valid address either
*/
if ( P && (P > 0xFFFF && *P) ) {
memory->free( memory, *P );
*P = 0;
}
}
==============================================================================
ttcload.c: ~380:
while ( flag < limit )
{
if ( --byte_len < 0 )
goto Invalid_Outline;
if(flag == 0) return; /* sanity check */
*flag++ = c = FT_GET_BYTE();
if ( c & 8 )
{
if ( --byte_len < 0 )
goto Invalid_Outline;
==============================================================================
ttgload.c: ~666:
FT_Vector* pp1;
FT_Vector* pp2;
if(!outline->points) return; /* sanity check */
/* pp1 = xMin - lsb */
pp1 = outline->points + n_points;
pp1->x = load->bbox.xMin - load->left_bearing;
pp1->y = 0;
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
- [Freetype] Some odd problems, fixed,
Shish <=