SVR2 (and older) nroff bug
Doug Gwyn
gwyn at brl-smoke.ARPA
Wed May 21 06:49:21 AEST 1986
Dave Yost found a bug in nroff that can cause a core dump on some machines.
In file n1.c, init1() contains a call to mchbits(), which uses device-
specific data that has not yet been set up! This file is shared by otroff,
which therefore has the same bug. BWK seems to have fixed it in new troff.
/*
* roff.src - v 2.9 of 9/9/83
...
*/
...
#ifdef NROFF
char ntversion[] = "@(#)nroff: n1.c 2.9";
#else
char ntversion[] = "@(#)otroff: n1.c 2.9";
#endif
...
int version = 29; /* nroff/troff version tag */
...
init1(a) /* DAG -- there was a FF at the beginning of this line! */
char a;
{
...
trtab[UNPAD] = ' ';
/* mchbits(); /* DAG -- device info not available here; moved to init2() (fixes bug reported by Dave Yost) */
...
}
init2() /* DAG -- FF here too! */
{
...
ptinit();
mchbits(); /* DAG -- moved here from init1() */
...
More information about the Net.bugs.usg
mailing list