Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: wggabb@sdrc.COM (Rob Gabbard)
Subject: strcat(foo,NULL) core dumps on Ultrix
Date: 11 Jun 91 12:34:21 GMT	[thread overview]
Message-ID: <966@sdrc.COM> (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


             reply	other threads:[~1991-06-11 12:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-06-11 12:34 Rob Gabbard [this message]
1991-06-12  4:00 ` strcat(foo,NULL) core dumps on Ultrix 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
read-only archive

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