forked from minhngoc25a/freetype2
use FT_UInt32 type to check UCS-2 codepoint overflow in cmap format 4 parser.
note: long type is too large for LP64 platforms.
This commit is contained in:
parent
58dd3a1e6e
commit
8f36537406
|
@ -836,8 +836,8 @@
|
|||
(FT_Int)end + delta >= 0 )
|
||||
charcode = (FT_UInt)( -delta );
|
||||
|
||||
else if ( (FT_Int)charcode + delta < 0x10000L &&
|
||||
(FT_Int)end + delta >= 0x10000L )
|
||||
else if ( (FT_Int32)charcode + delta < 0x10000L &&
|
||||
(FT_Int32)end + delta >= 0x10000L )
|
||||
charcode = (FT_UInt)( 0x10000L - delta );
|
||||
|
||||
else
|
||||
|
@ -1169,8 +1169,8 @@
|
|||
(FT_Int)end + delta >= 0 )
|
||||
charcode = (FT_UInt)( -delta );
|
||||
|
||||
else if ( (FT_Int)charcode + delta < 0x10000L &&
|
||||
(FT_Int)end + delta >= 0x10000L )
|
||||
else if ( (FT_Int32)charcode + delta < 0x10000L &&
|
||||
(FT_Int32)end + delta >= 0x10000L )
|
||||
charcode = (FT_UInt)( 0x10000L - delta );
|
||||
|
||||
else
|
||||
|
@ -1407,8 +1407,8 @@
|
|||
(FT_Int)end + delta >= 0 )
|
||||
charcode = (FT_UInt)( -delta );
|
||||
|
||||
else if ( (FT_Int)charcode + delta < 0x10000L &&
|
||||
(FT_Int)end + delta >= 0x10000L )
|
||||
else if ( (FT_Int32)charcode + delta < 0x10000L &&
|
||||
(FT_Int32)end + delta >= 0x10000L )
|
||||
charcode = (FT_UInt)( 0x10000L - delta );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue