Checknews (2.10.3 4.3bsd-beta 6/6/85) bug + fix
Sam Kendall
sam at delftcc.UUCP
Wed Nov 20 13:01:04 AEST 1985
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
More information about the Net.bugs
mailing list