* src/bdf/bdflib.c: fixed a problem with large encodings.

Again, this patch comes from Debian libfreetype6 for 2.1.10 !
This commit is contained in:
David Turner 2006-02-23 12:40:14 +00:00
parent 6cda6c064f
commit 481838e234
2 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,9 @@
this patch comes from the Debian package for libfreetype6 !!
How come nobody mentions this on the devel list ??
* src/bdf/bdflib.c: fixed a problem with large encodings.
Again, this patch comes from Debian libfreetype6 for 2.1.10 !
2006-02-23 Chia-I Wu <b90201047@ntu.edu.tw>
* include/freetype/ftoutln.h (enum FT_Orientation): New value

View File

@ -1561,6 +1561,14 @@
p->glyph_enc = _bdf_atol( p->list.field[1], 0, 10 );
/* Check that the encoding is in the range [0,65536] because */
/* otherwise p->have (a bitmap with static size) overflows. */
if ( p->glyph_enc >= sizeof(p->have)*8 )
{
error = BDF_Err_Invalid_File_Format;
goto Exit;
}
/* Check to see whether this encoding has already been encountered. */
/* If it has then change it to unencoded so it gets added if */
/* indicated. */