blob: eadeb64707acfc8fabb0e2769895cb451d49f016 (
plain) (
tree)
|
|
--- dvistuff.c.orig Fri Mar 12 01:05:35 1993
+++ dvistuff.c Mon May 6 04:48:49 1996
@@ -996,13 +996,14 @@
}
else
free(fnt->name); /* free old name */
- if ((name = (char *) malloc(namelen * sizeof(char))) == NULL) {
+ if ((name = (char *) malloc((namelen + 1) * sizeof(char))) == NULL) {
perror("fontdef");
exit(1);
}
for (i = 0; i < namelen; i++)
name[i] = get1();
+ name[namelen] = '\0';
fnt->name = name;
if (new) {
fnt->next = fonts;
|