🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Sam Kendall Wed, 20 Nov 1985 03:01
Checknews (2.10.3 4.3bsd-beta 6/6/85) bug + fix
#4
Author: Sam Kendall
Date: Wed, 20 Nov 1985 03:01
23 lines
1286 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads