summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2014-07-24 15:34:20 -0400
committerBehdad Esfahbod <behdad@behdad.org>2014-07-24 15:34:20 -0400
commit76151ceaf3417a987ae2c36b247ca82f50d857f6 (patch)
treec3f3ae5655e7314fafb8eea474a276bb21437c8f /src
parentaeba5bf4b69f8b559cb909df12d0a636e6054325 (diff)
Ouch, fix buffer
Diffstat (limited to 'src')
-rw-r--r--src/fcfreetype.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 8a95ee42..9740a14f 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -829,7 +829,7 @@ FcSfntNameTranscode (FT_SfntName *sname)
*u8 = '\0';
goto done;
}
- if (!strcmp (fromcode, "MACINTOSH"))
+ if (!strcmp (fromcode, FC_ENCODING_MAC_ROMAN))
{
FcChar8 *src = sname->string;
int src_len = sname->string_len;
@@ -840,7 +840,7 @@ FcSfntNameTranscode (FT_SfntName *sname)
/*
* Convert Latin1 to Utf8. Freed below
*/
- utf8 = malloc (src_len + 1);
+ utf8 = malloc (src_len * 3 + 1);
if (!utf8)
return 0;