shithub: freetype+ttf2subf

Download patch

ref: 1ca5fa15b0a96360d73a4d114c2d3667aae898ba
parent: 673a28ef93a94e1cf604c38cd4db9146ead2abbb
author: Werner Lemberg <[email protected]>
date: Sun Oct 12 04:31:32 EDT 2014

[sfnt] Fix Savannah bug #43392.

* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
vertical metrics uninitialized.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-12  Werner Lemberg  <[email protected]>
+
+	[sfnt] Fix Savannah bug #43392.
+
+	* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
+	vertical metrics uninitialized.
+
 2014-10-11  Alexei Podtelezhnikov  <[email protected]>
 
 	[base] Small bbox correction.
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -505,6 +505,13 @@
 
       p += 3;
     }
+    else
+    {
+      /* avoid uninitialized data in case there is no vertical info -- */
+      metrics->vertBearingX = 0;
+      metrics->vertBearingY = 0;
+      metrics->vertAdvance  = metrics->width;
+    }
 
     decoder->metrics_loaded = 1;
     *pp = p;