Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* strcat(foo,NULL) core dumps on Ultrix
@ 1991-06-11 12:34 Rob Gabbard
  1991-06-12  4:00 ` Larry Meehan
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Rob Gabbard @ 1991-06-11 12:34 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1991-06-13  7:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1991-06-11 12:34 strcat(foo,NULL) core dumps on Ultrix Rob Gabbard
1991-06-12  4:00 ` Larry Meehan
1991-06-12  6:20   ` Norman Diamond
1991-06-12 21:41     ` Larry Meehan
1991-06-13  7:20       ` Norman Diamond
1991-06-12  4:12 ` Norman Diamond
1991-06-12  4:34 ` George Robbins
1991-06-12 17:05 ` Lance Franklin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox