[truetype] Fix TT_Set_Var_Design. Reported by Nikolaus Waxweiler <madigens@gmail.com>. * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the case where we have less input coordinates than axes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
diff --git a/ChangeLog b/ChangeLog
index 49ed495..e6441ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2017-06-10 Werner Lemberg <wl@gnu.org>
+ [truetype] Fix TT_Set_Var_Design.
+
+ Reported by Nikolaus Waxweiler <madigens@gmail.com>.
+
+ * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the
+ case where we have less input coordinates than axes.
+
+2017-06-10 Werner Lemberg <wl@gnu.org>
+
* src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo.
Bug introduced 2017-05-28.
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 16a2e56..f204979 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -2640,7 +2640,7 @@
num_coords * sizeof ( FT_Fixed ) );
a = mmvar->axis + num_coords;
- c = coords + num_coords;
+ c = blend->coords + num_coords;
for ( i = num_coords; i < mmvar->num_axis; i++, a++, c++ )
*c = a->def;
@@ -2650,7 +2650,7 @@
if ( !face->blend->avar_loaded )
ft_var_load_avar( face );
- ft_var_to_normalized( face, num_coords, coords, normalized );
+ ft_var_to_normalized( face, num_coords, blend->coords, normalized );
error = tt_set_mm_blend( face, mmvar->num_axis, normalized, 0 );