···11+http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=f958c48ee43
22+33+diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
44+index af7b465..7dd4513 100644
55+--- a/src/psaux/t1decode.c
66++++ b/src/psaux/t1decode.c
77+@@ -780,10 +780,19 @@
88+ /* point without adding any point to the outline */
99+ idx = decoder->num_flex_vectors++;
1010+ if ( idx > 0 && idx < 7 )
1111++ {
1212++ /* in malformed fonts it is possible to have other */
1313++ /* opcodes in the middle of a flex (which don't */
1414++ /* increase `num_flex_vectors'); we thus have to */
1515++ /* check whether we can add a point */
1616++ if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) )
1717++ goto Syntax_Error;
1818++
1919+ t1_builder_add_point( builder,
2020+ x,
2121+ y,
2222+ (FT_Byte)( idx == 3 || idx == 6 ) );
2323++ }
2424+ }
2525+ break;
2626+2727+
···11+http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=3774fc08b
22+33+diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
44+index d18e821..0baf836 100644
55+--- a/src/psaux/psobjs.c
66++++ b/src/psaux/psobjs.c
77+@@ -1718,6 +1718,14 @@
88+ first = outline->n_contours <= 1
99+ ? 0 : outline->contours[outline->n_contours - 2] + 1;
1010+1111++ /* in malformed fonts it can happen that a contour was started */
1212++ /* but no points were added */
1313++ if ( outline->n_contours && first == outline->n_points )
1414++ {
1515++ outline->n_contours--;
1616++ return;
1717++ }
1818++
1919+ /* We must not include the last point in the path if it */
2020+ /* is located on the first point. */
2121+ if ( outline->n_points > 1 )
2222+
+3
pkgs/development/libraries/freetype/default.nix
···4848 ./pcf-config-long-family-names.patch
4949 ./disable-pcf-long-family-names.patch
5050 ./enable-table-validation.patch
5151+ # remove the two CVE patches after updating to >= 2.8
5252+ ./cve-2017-8105.patch
5353+ ./cve-2017-8287.patch
5154 ] ++
5255 optional useEncumberedCode ./enable-subpixel-rendering.patch;
5356