summaryrefslogtreecommitdiff
path: root/src/type1/t1load.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/type1/t1load.c')
-rw-r--r--src/type1/t1load.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 51b0b1372..0186decef 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1079,6 +1079,13 @@
temp_scale = FT_ABS( temp[3] );
+ if ( temp_scale == 0 )
+ {
+ FT_ERROR(( "parse_font_matrix: invalid font matrix\n" ));
+ parser->root.error = T1_Err_Invalid_File_Format;
+ return;
+ }
+
/* Set Units per EM based on FontMatrix values. We set the value to */
/* 1000 / temp_scale, because temp_scale was already multiplied by */
/* 1000 (in t1_tofixed, from psobjs.c). */