shithub: freetype+ttf2subf

Download patch

ref: 5cb356405eb9f9cad624487a0b836ff6e6f51d6c
parent: 2fb22d56491235ac44073b73be0bb6444aaf6d46
author: Werner Lemberg <[email protected]>
date: Sat Dec 10 18:16:04 EST 2011

Add some variable initializations.
Reported by Richard COOK <[email protected]>.

* src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'.
* src/smooth/ftgrays.c (gray_render_conic): Initialize `levels'
earlier.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-12-10  Werner Lemberg  <[email protected]>
+
+	Add some variable initializations.
+	Reported by Richard COOK <[email protected]>.
+
+	* src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'.
+	* src/smooth/ftgrays.c (gray_render_conic): Initialize `levels'
+	earlier.
+
 2011-12-08  Werner Lemberg  <[email protected]>
 
 	Fix serious scaling bug in `FT_Get_Advances'.
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -878,6 +878,8 @@
     FT_Vector*  arc;
 
 
+    levels = ras.lev_stack;
+
     arc      = ras.bez_stack;
     arc[0].x = UPSCALE( to->x );
     arc[0].y = UPSCALE( to->y );
@@ -916,7 +918,6 @@
       level++;
     } while ( dx > ONE_PIXEL / 4 );
 
-    levels    = ras.lev_stack;
     levels[0] = level;
 
     do
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -195,7 +195,7 @@
       if ( idx < sizeof ( type1->font_matrix ) /
                    sizeof ( type1->font_matrix.xx ) )
       {
-        FT_Fixed  val;
+        FT_Fixed  val = 0;
 
 
         retval = sizeof ( val );
@@ -225,7 +225,7 @@
       if ( idx < sizeof ( type1->font_bbox ) /
                    sizeof ( type1->font_bbox.xMin ) )
       {
-        FT_Fixed val;
+        FT_Fixed val = 0;
 
 
         retval = sizeof ( val );