shithub: freetype+ttf2subf

Download patch

ref: 3eb6f66a37c2c6aa34bbd30eec2c9d1eb50b1ddb
parent: 015c6e08a1e87b421b1dfcff313eeba024f4bc14
author: Werner Lemberg <[email protected]>
date: Tue Mar 1 02:10:30 EST 2016

[autofit] Fix reallocation error introduced in 2016-02-27 (#47310).

* src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
`prev_segment' after reallocation.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2016-03-01  Werner Lemberg  <[email protected]>
 
+	[autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
+
+	* src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
+	`prev_segment' after reallocation.
+
+2016-03-01  Werner Lemberg  <[email protected]>
+
 	Fix clang warnings.
 
 	* src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1701,6 +1701,11 @@
           segment->first = point;
           segment->last  = point;
 
+          /* `af_axis_hints_new_segment' reallocates memory,    */
+          /* thus we have to refresh the `prev_segment' pointer */
+          if ( prev_segment )
+            prev_segment = segment - 1;
+
           min_pos   = max_pos   = point->u;
           min_coord = max_coord = point->v;
           min_flags = max_flags = point->flags;