United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 4755211 Java2D font scaler has memory alignment bug in TrueType hinting code.
4755211 : Java2D font scaler has memory alignment bug in TrueType hinting code.

Details
Type:
Bug
Submit Date:
2002-09-29
Status:
Resolved
Updated Date:
2003-03-18
Project Name:
JDK
Resolved Date:
2002-10-16
Component:
client-libs
OS:
solaris_8,solaris_7
Sub-Component:
2d
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.1_03

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

Description
This is once of the causes of bug 
4482430: Unexpected exception from NativeFontWrapper.registerFonts
Several fonts we have found trigger a specific problem in the rasteriser.

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.1_03
mantis

FIXED IN:
1.4.1_03
mantis

INTEGRATED IN:
1.4.1_03
mantis
mantis-b04


                                     
2004-06-14
EVALUATION


In the TT hinting code a buffer is allocated sufficient to hold several
arrays of data which represent information about points and contours of
a glyph outline. The arrays hold data of 1,2 and 4 byte quantities.

Unfortunately the number of byte needed was calculated without any
regard for address alignment requirements, and in particular
an array of 4 byte data was right after an array of 1 byte data.
Thus it was necessary to add the needed padding for this case.
The code is inherently vulnerable to such things but it was sufficient
to fix this one case.
The structure is fnt_ElementType defined in Fnt.c
GlyphOutline.c is where the storage is calculated (ComputeElementSizes)
and  SetElementPointers is the function which sets the pointers to locations
within a buffer allocated to hold that amount of storage.

###@###.### 2002-09-29
============================
                                     
2002-09-29



Hardware and Software, Engineered to Work Together