From cf1c327737a887c027ae2669da0fb431cd866ee6 Mon Sep 17 00:00:00 2001 From: kramm Date: Fri, 6 Feb 2004 17:48:21 +0000 Subject: [PATCH] fix for segfault in LoadT1Font if the fontname is not defined --- lib/modules/swffont.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index 21a19e6..f355829 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -300,7 +300,10 @@ SWFFONT* swf_LoadT1Font(char*filename) memset(font, 0, sizeof(SWFFONT)); font->version = 2; - font->name = (U8*)strdup(fontname); + if(fontname) + font->name = (U8*)strdup(fontname); + else + font->name = 0; font->layout = (SWFLAYOUT*)malloc(sizeof(SWFLAYOUT)); memset(font->layout, 0, sizeof(SWFLAYOUT)); -- 1.7.10.4