* src/base/ftstream.c (FT_Stream_ReadFields): Update condition.
This commit is contained in:
parent
7c75b8a7bd
commit
72e199e8d3
@ -763,10 +763,10 @@
|
||||
case ft_frame_bytes: /* read a byte sequence */
|
||||
case ft_frame_skip: /* skip some bytes */
|
||||
{
|
||||
FT_UInt len = fields->size;
|
||||
FT_Int len = fields->size;
|
||||
|
||||
|
||||
if ( cursor + len > stream->limit )
|
||||
if ( len > stream->limit - cursor )
|
||||
{
|
||||
error = FT_THROW( Invalid_Stream_Operation );
|
||||
goto Exit;
|
||||
|
Loading…
Reference in New Issue
Block a user