summaryrefslogtreecommitdiff
path: root/app/mkfontscale/ident.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2013-07-21 14:00:10 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2013-07-21 14:00:10 +0000
commit46396e49ab3578d76207d4124821c41d4bfa9bf9 (patch)
treecfb74cce3770ff3086fd7ad48f3c28b273539034 /app/mkfontscale/ident.c
parentb99f409ae1fc5e815664d123c90efb8fb1f445d0 (diff)
Update to mkfontscale 1.1.1
Diffstat (limited to 'app/mkfontscale/ident.c')
-rw-r--r--app/mkfontscale/ident.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/mkfontscale/ident.c b/app/mkfontscale/ident.c
index bf544832c..22d364830 100644
--- a/app/mkfontscale/ident.c
+++ b/app/mkfontscale/ident.c
@@ -47,7 +47,9 @@
and 0 if it should be processed normally. identifyBitmap is
much faster than parsing the whole font. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdlib.h>
#include <string.h>
@@ -315,10 +317,9 @@ pcfIdentify(fontFile *f, char **name)
if(i >= nprops)
goto fail;
- s = malloc(strlen(strings + props[i].value) + 1);
+ s = strdup(strings + props[i].value);
if(s == NULL)
goto fail;
- strcpy(s, strings + props[i].value);
*name = s;
free(strings);
free(props);