🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.dec
Article #4086

strcat(foo,NULL) core dumps on Ultrix

#4086
From: Rob Gabbard
Date: Tue, 11 Jun 1991 12:34
19 lines
967 bytes
A call to strcat with NULL as the second argument core dumps with a memory 
fault on Ultrix.  Why would anyone want to do this anyway ? How about....

	strcat(foo,getenv("FOO"))

		instead of

	if (getenv("FOO")) strcat(foo,getenv("FOO"));

Actually, just coding strcat(foo,NULL) will dump.  Anyone run into this ?
Am I doing a no-no here.

-- 
The statements above are my own and do not neccesarily reflect the opinion of 
my employer.
-------------------------------------------------------------------------------
Rob Gabbard 				    wggabb@sdrc.sdrc.com
Technical Development Engineer
Structural Dynamics Research Corporation
Technical Details
Message-ID: <966@sdrc.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sdrc!wggabb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sdrc!wggabb
From: wggabb@sdrc.COM (Rob Gabbard)
Newsgroups: comp.sys.dec
Subject: strcat(foo,NULL) core dumps on Ultrix
Keywords: dec c strcat
Message-ID: <966@sdrc.COM>
Date: 11 Jun 91 12:34:21 GMT
Organization: SDRC, Cincinnati
Lines: 19