git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b01889
)
fix for segfault in LoadT1Font if the fontname is not defined
author
kramm
<kramm>
Fri, 6 Feb 2004 17:48:21 +0000
(17:48 +0000)
committer
kramm
<kramm>
Fri, 6 Feb 2004 17:48:21 +0000
(17:48 +0000)
lib/modules/swffont.c
patch
|
blob
|
history
diff --git
a/lib/modules/swffont.c
b/lib/modules/swffont.c
index
21a19e6
..
f355829
100644
(file)
--- 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));