freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 7a019a6: [woff2] Return if single stream operation fa


From: Nikhil Ramakrishnan
Subject: [freetype2] master 7a019a6: [woff2] Return if single stream operation fails.
Date: Sat, 4 Apr 2020 04:37:49 -0400 (EDT)

branch: master
commit 7a019a63ed9753772e758beec3cad7c0b74ee2aa
Author: Nikhil Ramakrishnan <address@hidden>
Commit: Nikhil Ramakrishnan <address@hidden>

    [woff2] Return if single stream operation fails.
    
    * src/sfnt/sfwoff2.c (get_x_mins): Do it.
    
    * src/sfnt/woff2tags.c: Remove unused include.
---
 ChangeLog            | 8 ++++++++
 src/sfnt/sfwoff2.c   | 6 +++---
 src/sfnt/woff2tags.c | 1 -
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 13d490c..a3a84ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-04-04  Nikhil Ramakrishnan  <address@hidden>
+
+       [woff2] Return if single stream operation fails.
+
+       * src/sfnt/sfwoff2.c (get_x_mins): Do it.
+
+       * src/sfnt/woff2tags.c: Remove unused include.
+
 2020-03-22  Nikhil Ramakrishnan  <address@hidden>
 
        [docs] Fix building docs if `srcdir' != `builddir'.
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
index fe3fbe8..1b99e7d 100644
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -1288,7 +1288,7 @@
     }
 
     /* Read `numGlyphs' field from `maxp' table. */
-    if ( FT_STREAM_SEEK( maxp_table->src_offset ) && FT_STREAM_SKIP( 8 ) )
+    if ( FT_STREAM_SEEK( maxp_table->src_offset ) || FT_STREAM_SKIP( 8 ) )
       return error;
 
     if ( FT_READ_USHORT( num_glyphs ) )
@@ -1297,7 +1297,7 @@
     info->num_glyphs = num_glyphs;
 
     /* Read `indexToLocFormat' field from `head' table. */
-    if ( FT_STREAM_SEEK( head_table->src_offset ) &&
+    if ( FT_STREAM_SEEK( head_table->src_offset ) ||
          FT_STREAM_SKIP( 50 )                     )
       return error;
 
@@ -1335,7 +1335,7 @@
 
       glyf_offset += info->glyf_table->src_offset;
 
-      if ( FT_STREAM_SEEK( glyf_offset ) && FT_STREAM_SKIP( 2 ) )
+      if ( FT_STREAM_SEEK( glyf_offset ) || FT_STREAM_SKIP( 2 ) )
         return error;
 
       if ( FT_READ_USHORT( info->x_mins[i] ) )
diff --git a/src/sfnt/woff2tags.c b/src/sfnt/woff2tags.c
index 9034fc9..246f7fa 100644
--- a/src/sfnt/woff2tags.c
+++ b/src/sfnt/woff2tags.c
@@ -17,7 +17,6 @@
 
 
 #include <ft2build.h>
-#include "sfwoff.h"
 #include FT_TRUETYPE_TAGS_H
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]