freebsd-ports/print/dvi2tty/files/patch-ad
Matthew Hunt 0291713240 Change default pager from /usr/bin/pg to /usr/bin/more. As before,
$PAGER overrides.
(Requested by:	dcs)

One patch per modified file.

One modified file per patch.

Honor CC, CFLAGS.

Use BSD_INSTALL_FOO and, as a side effect, install with our customary
ownerships.

No response from:	maintainer
2000-10-19 15:53:29 +00:00

18 lines
532 B
Text

--- 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;