[net.notes] newsinput hangs

johnl@ima.UUCP (08/04/83)

#N:ima:18500001:000:483
ima!johnl    Aug  3 21:43:00 1983

I noticed that the "newsinput" program here was getting hung a lot, and
inspection shows many places in the code like:

	while(getchar() != '\n')
		;

If the note got truncated so that the header is incomplete, this sort of
code hangs up.  Tsk, tsk.  The fix is easy.  In all such places, change
the code to something like this:

	while(getchar() != '\n')
		if(feof(stdin))
			exit(1);

John Levine, decvax!yale-co!ima!johnl, ucbvax!cbosgd!ima!johnl,
{allegra|floyd|amd70}!ima!johnl