[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 340767bf8: * src/sfnt/ttpost.c (load_format_*): Strea
From: |
Werner Lemberg |
Subject: |
[freetype2] master 340767bf8: * src/sfnt/ttpost.c (load_format_*): Streamline frame reading. |
Date: |
Sun, 2 Apr 2023 22:07:49 -0400 (EDT) |
branch: master
commit 340767bf85b054595c42dd1c089318cb19d45899
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/ttpost.c (load_format_*): Streamline frame reading.
---
src/sfnt/ttpost.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index f4e8fe508..ac9de6e24 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -169,6 +169,7 @@
FT_UShort* glyph_indices = NULL;
FT_Byte** name_strings = NULL;
+ FT_Byte* q;
if ( (FT_ULong)num_glyphs * 2 > post_len )
@@ -182,9 +183,11 @@
FT_FRAME_ENTER( num_glyphs * 2 ) )
goto Fail;
+ q = (FT_Byte*)stream->cursor;
+
for ( n = 0; n < num_glyphs; n++ )
{
- FT_UShort idx = FT_GET_USHORT();
+ FT_UShort idx = FT_NEXT_USHORT( q );
if ( idx > num_names )
@@ -272,6 +275,7 @@
FT_UShort n;
FT_UShort* glyph_indices = NULL;
+ FT_Byte* q;
/* check the number of glyphs, including the theoretical limit */
@@ -287,9 +291,11 @@
FT_FRAME_ENTER( num_glyphs ) )
goto Fail;
+ q = (FT_Byte*)stream->cursor;
+
for ( n = 0; n < num_glyphs; n++ )
{
- FT_Int idx = n + FT_GET_CHAR();
+ FT_Int idx = n + FT_NEXT_CHAR( q );
if ( idx < 0 || idx > 257 )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 340767bf8: * src/sfnt/ttpost.c (load_format_*): Streamline frame reading.,
Werner Lemberg <=