shithub: freetype+ttf2subf

Download patch

ref: 80a330afe89e6b024700941a7931dbfc5d944748
parent: 7c64409e8662b9d3c14bcc601f2b787373dd4ec1
author: Just van Rossum <[email protected]>
date: Tue Aug 1 03:12:31 EDT 2000

fixed two bugs related to T2 real numbers: the "skipping" code didn't behave correctly (leaving a bad stack ptr), and the actual parsing code also parsed the code (30) as two nibbles.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/cff/t2parse.c
+++ b/src/cff/t2parse.c
@@ -153,7 +153,7 @@
                            FT_Byte*  limit,
                            FT_Int    power_ten )
   {
-    FT_Byte*  p    = start;
+    FT_Byte*  p    = ++start;
     FT_Long   num, divider, result, exp;
     FT_Int    sign = 0, exp_sign = 0;
     FT_Byte   nib;
@@ -472,6 +472,7 @@
         if ( v == 30 )
         {
           /* skip real number */
+          p++;
           for (;;)
           {
             if ( p >= limit )
@@ -484,7 +485,6 @@
               break;
             p++;
           }
-          p++;
         }
         else if ( v == 28 )
           p += 2;
@@ -525,7 +525,6 @@
             /* we found our field's handler; read it */
             FT_Long   val;
             FT_Byte*  q = (FT_Byte*)parser->object + field->offset;
-
 
             switch ( field->kind )
             {