Cron dies, why ?

chris at umcp-cs.UUCP chris at umcp-cs.UUCP
Sat Jan 21 13:37:32 AEST 1984


cron has a bug in dealing with long lines in /usr/lib/crontab.
The source has a magic constant in the table reader.  On standard
4.1BSD systems this is 100.  This constant says when to allocate
more table space.  If you're down to 110 characters it won't allocate
more space; if you then read in a long (>110 char) line the table
will overflow and the *next* call to malloc (realloc) will fail
with a segmentation fault or equivalent.

The quick fix, of course, is to increase the magic constant.  If it's
1024 then you can't make a long enough line in vi to overflow the table,
so that's a pretty good value.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris.umcp-cs at CSNet-Relay



More information about the Comp.unix.wizards mailing list