[net.news] Bug in expire: uninitialized pointer

ken@turtlevax.UUCP (Ken Turkowski) (10/16/85)

I'm having problems porting news 2.10.2 to the 68000, which barfs on
NULL pointers.  Expire core dumps on me, when in hread() it tries to
copy (via strcpy()) FULLSYSNAME to bfr.  At this point, FULLSYSNAME is
NULL (uninitialized), so the call is essentially strcpy(bfr, 0).  I
suspect that this bug is pervasive throughout the code.

Has anyone made the appropriate modifications to avoid this problem?
Could you send me the fixes, or pointers (no pun intended) to where I
can get working code?
-- 
Ken Turkowski @ (CADLINC --> CIMLINC), Menlo Park, CA
UUCP: {amd,decwrl,hplabs,seismo,spar}!turtlevax!ken
ARPA: turtlevax!ken@DECWRL.ARPA

campbell@maynard.UUCP (Larry Campbell) (10/18/85)

> I'm having problems porting news 2.10.2 to the 68000, which barfs on
> NULL pointers.  Expire core dumps on me, when in hread() it tries to
> copy (via strcpy()) FULLSYSNAME to bfr.  At this point, FULLSYSNAME is
> NULL (uninitialized), so the call is essentially strcpy(bfr, 0).  I
> suspect that this bug is pervasive throughout the code.
> 
> Has anyone made the appropriate modifications to avoid this problem?
> Could you send me the fixes, or pointers (no pun intended) to where I
> can get working code?
> -- 
> Ken Turkowski @ (CADLINC --> CIMLINC), Menlo Park, CA
> UUCP: {amd,decwrl,hplabs,seismo,spar}!turtlevax!ken
> ARPA: turtlevax!ken@DECWRL.ARPA

Why not just write and link with a version of strcpy that doesn't
try to dereference null pointers?