|
Description
|
FULL PRODUCT VERSION :
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
MS Windows XP Pro Version 2002 Service Pack 2
A DESCRIPTION OF THE PROBLEM :
java.awt.Font.createFont(int fontFormat, InputStream fontStream) causes JVM crash while loading an invalid TrueType font instead of throwing a FontFormatException.
The particular font file, where the problem is reproduced, has embedded bitmaps and its EBSC table is invalid - contains only the first 4 bytes (00 customer 00 00) (a result got during font creation program development).
"Assertion failed" error message appears, pointing to src/share/native/sun/font/t2k/t2kstrm.c, line 91, expression "pos <= t->maxPos".
While in real life it should be a rare occasion (however, something like incompletely downloaded TTF could probably cause that as well), crashing JVM seems to be a really bad result. In particular, it could be considered as a security flaw in the system.
Also, this, of course, gives no information regarding what exactly wrong with the file, while exception could describe that in more detail.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I can send an sample TTF upon request.
REPRODUCIBILITY :
This bug can be reproduced always.
Posted Date : 2007-07-07 23:09:18.0
|