DWB tbl bug!! HELP

Cameron Davidson probe at mm730.uq.OZ
Wed Feb 5 11:14:17 AEST 1986


The problem arises when something scribbles 4 bytes into the input
buffer of (FILE *)tabin.
It occurs during the call to frearr() after the first table finishes printing
when the alloc'd memory is freed.
I think the problem is caused by the allocation at line 291 of t4.c
in routine garray() and the problem seems to have gone away by increasing
the allocation to 'sep' by one int.:
	sep = (int *) getcore(qcol+2, sizeof(int));
	sep++; /* sep[-1] must be legal */
Note the second line which seems to be a big hint that the program actually
uses one more.

I only *think* the problem is fixed because every time tbl is compiled -with
and without '-g' the symptom shifts and sometimes the test file then runs OK
but another one fails.

We originally got around the problem by just running this version as
'big-tbl' for those who needed more than 20 columns and took input
always from stdin - When that is done whatever was causing the problems
seemed to have no harmful effects.

Cameron Davidson
probe at mm730.uq.oz
UUCP:..seismo!munnari!mm730.oz!probe



More information about the Net.bugs mailing list