From 6b440425fc0d2ba82068972e38e3e67ba5e88d6d Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 18 Jul 2012 10:39:18 +0200 Subject: [PATCH] Fix Savannah bug #36833. * src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid operator if we want metrics only. --- ChangeLog | 9 ++++++++- src/psaux/t1decode.c | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19ccf318d..030bf6305 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-07-17 Werner Lemberg + + 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 Fix Savannah bug #36832. @@ -20,7 +27,7 @@ 2012-07-11 Werner Lemberg - [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 diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index ea6784122..8afe02193 100644 --- 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, */ @@ -208,6 +208,12 @@ return PSaux_Err_Syntax_Error; } + if ( decoder->builder.metrics_only ) + { + FT_ERROR(( "t1operator_seac: unexpected seac\n" )); + return PSaux_Err_Syntax_Error; + } + /* seac weirdness */ adx += decoder->builder.left_bearing.x;