bug in /etc/htable found

Lee Moore lee at ROCHESTER.ARPA
Mon Feb 25 09:42:20 AEST 1985


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);
	> 		}



More information about the Comp.unix.wizards mailing list