From 91cad7c2baf4d257bd97bcea1244937c21c083cd Mon Sep 17 00:00:00 2001 From: kramm Date: Thu, 22 May 2008 13:58:08 +0000 Subject: [PATCH] terminate font name with \0 --- lib/modules/swftext.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index ee3923e..064b47e 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -942,10 +942,11 @@ int swf_FontSetDefine2(TAG * tag, SWFFONT * f) swf_SetU8(tag, 0); //reserved flags if (f->name) { /* font name */ - swf_SetU8(tag, strlen((const char*)f->name)); - swf_SetBlock(tag, f->name, strlen((const char*)f->name)); + swf_SetU8(tag, strlen((const char*)f->name)+1); + swf_SetBlock(tag, f->name, strlen((const char*)f->name)+1); } else { /* font name (="") */ + swf_SetU8(tag, 1); swf_SetU8(tag, 0); } /* number of glyphs */ -- 1.7.10.4