ref: 6fc12943e99b05f489b634e79b5cd590eb7ffc3f
parent: e419f48b40a746465a6c8e1d446b407b8677bfed
author: Werner Lemberg <[email protected]>
date: Thu Jun 24 16:20:26 EDT 2010
Fix Savannah bug #30247. * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with zero metrics.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-24 Werner Lemberg <[email protected]>
+
+ Fix Savannah bug #30247.
+
+ * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
+ zero metrics.
+
2010-06-24 Graham Asher <[email protected]>
* src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -2,7 +2,8 @@
FreeType font driver for pcf fonts
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2010 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -606,6 +607,9 @@
return PCF_Err_Invalid_File_Format;
face->nmetrics = nmetrics;
+
+ if ( !nmetrics )
+ return PCF_Err_Invalid_Table;
FT_TRACE4(( "pcf_get_metrics:\n" ));