[net.unix-wizards] bug in /etc/htable found

lee@ROCHESTER.ARPA (Lee Moore) (02/25/85)

Subject: htable loops infinitely on one letter host names
Index:	etc/htable 4.2BSD

Description:
	I tried running htable on a host table that I construct which
	has some one letter host names.  This caused htable to loop
	infinitely and to create potentially infinite "hosts" file.
	It makes this large host file by repeating the last host name
	over and over.
Repeat-By:
	Take your favorite hosts.txt and edit a name down to one
	character.
Fix:
	The fix needs to be applied to "htable/scan.l".  Unlike multi-character
	identifers, the single character identifer is not initialized
	correctly.  The diff is below.
	37c37,40
	< {ALPHA}		return (NAME);
	---
	> {ALPHA}		{
	> 			yylval.namelist = newname(yytext);
	> 			return (NAME);
	> 		}