[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 72e199e8d 1/2: * src/base/ftstream.c (FT_Stream_ReadF
From: |
Werner Lemberg |
Subject: |
[freetype2] master 72e199e8d 1/2: * src/base/ftstream.c (FT_Stream_ReadFields): Update condition. |
Date: |
Thu, 1 Aug 2024 21:19:22 -0400 (EDT) |
branch: master
commit 72e199e8d370ee1a4ca70ebedb0b2be794b7f508
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftstream.c (FT_Stream_ReadFields): Update condition.
---
src/base/ftstream.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/base/ftstream.c b/src/base/ftstream.c
index 41fd913be..eca0980bd 100644
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 72e199e8d 1/2: * src/base/ftstream.c (FT_Stream_ReadFields): Update condition.,
Werner Lemberg <=