зеркало из https://github.com/stride3d/freetype.git
truetype: Check invalid function number in FDEF instruction.
This commit is contained in:
Родитель
9206eba291
Коммит
d1c23082b6
|
@ -1,3 +1,10 @@
|
|||
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
truetype: Check invalid function number in FDEF instruction.
|
||||
|
||||
* src/truetype/ttinterp.c (Ins_FDEF): Check
|
||||
if the operand fits 16-bit function number.
|
||||
|
||||
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
truetype: Truncate the deltas of composite glyph at 16-bit values.
|
||||
|
|
|
@ -4290,13 +4290,21 @@
|
|||
CUR.numFDefs++;
|
||||
}
|
||||
|
||||
/* Although FDEF takes unsigned 32-bit integer, */
|
||||
/* func # must be within unsigned 16-bit integer */
|
||||
if ( n > 0xFFFFU )
|
||||
{
|
||||
CUR.error = TT_Err_Too_Many_Function_Defs;
|
||||
return;
|
||||
}
|
||||
|
||||
rec->range = CUR.curRange;
|
||||
rec->opc = n;
|
||||
rec->opc = (FT_UInt16)n;
|
||||
rec->start = CUR.IP + 1;
|
||||
rec->active = TRUE;
|
||||
|
||||
if ( n > CUR.maxFunc )
|
||||
CUR.maxFunc = n;
|
||||
CUR.maxFunc = (FT_UInt16)n;
|
||||
|
||||
/* Now skip the whole function definition. */
|
||||
/* We don't allow nested IDEFS & FDEFs. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче