summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkfontscale.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkfontscale.c b/mkfontscale.c
index d692e3c..2b07c67 100644
--- a/mkfontscale.c
+++ b/mkfontscale.c
@@ -971,6 +971,10 @@ doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo)
char *s;
s = malloc(l - 10);
+ if (s == NULL) {
+ fprintf(stderr, "Couldn't allocate xlfd name\n");
+ exit(1);
+ }
memcpy(s, xlfd_name, l - 11);
s[l - 11] = '\0';
xlfd = listCons(s, xlfd);