[net.news.b] Checknews

sam@delftcc.UUCP (Sam Kendall) (11/20/85)

Description:
	Checknews dumps core on machines like our Codata 68000,
	which don't like indirection of NULL.  It will probably
	write in low-addressed locations on other machines.

Fix:
	In the code below, "username" can be NULL.  The fix is
	copied from funcs2.c.

396,398c397,399
< 		if (username[0] == 0)
< 			strcpy(username, p->pw_name);
< 		strcpy(userhome, p->pw_dir);
---
> 		if (username == NULL || username[0] == 0)
> 			username = AllocCpy(p->pw_name);
> 		userhome = AllocCpy(p->pw_dir);

----
Sam Kendall					"This bug found with
Delft Consulting Corp.				 The Bcc Compiler, a
(212) 243-8700					 'C' runtime checker."
{allegra, seismo!cmcl2, ihnp4}!delftcc!sam