shithub: freetype+ttf2subf

Download patch

ref: 6b440425fc0d2ba82068972e38e3e67ba5e88d6d
parent: 01b508f2470a482308187a26b2a9af6bddce87e7
author: Werner Lemberg <[email protected]>
date: Wed Jul 18 06:39:18 EDT 2012

Fix Savannah bug #36833.

* src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid
operator if we want metrics only.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-07-17  Werner Lemberg  <[email protected]>
+
+	Fix Savannah bug #36833.
+
+	* src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid
+	operator if we want metrics only.
+
 2012-07-16  Werner Lemberg  <[email protected]>
 
 	Fix Savannah bug #36832.
@@ -20,7 +27,7 @@
 
 2012-07-11  Werner Lemberg  <[email protected]>
 
-	[smooth] Avoid memory like in case of failure.
+	[smooth] Avoid memory leak in case of failure.
 
 	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to
 	indicate what to clean up after finishing the function, with and
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript Type 1 decoding routines (body).                          */
 /*                                                                         */
-/*  Copyright 2000-2011 by                                                 */
+/*  Copyright 2000-2012 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -205,6 +205,12 @@
     if ( decoder->seac )
     {
       FT_ERROR(( "t1operator_seac: invalid nested seac\n" ));
+      return PSaux_Err_Syntax_Error;
+    }
+
+    if ( decoder->builder.metrics_only )
+    {
+      FT_ERROR(( "t1operator_seac: unexpected seac\n" ));
       return PSaux_Err_Syntax_Error;
     }