From: grr@cbmvax.commodore.com (George Robbins)
Subject: Re: strcat(foo,NULL) core dumps on Ultrix
Date: 12 Jun 91 04:34:33 GMT [thread overview]
Message-ID: <22346@cbmvax.commodore.com> (raw)
In-Reply-To: 966@sdrc.COM
In article <966@sdrc.COM> wggabb@sdrc.COM (Rob Gabbard) writes:
> 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....
>
> Actually, just coding strcat(foo,NULL) will dump. Anyone run into this ?
> Am I doing a no-no here.
You is doing a no-no. NULL is not a defined to be a usable pointer
value, it is only a flag that no meaningful value is being provided
for the argument. Of course, with many compilers, NULL is kinda
equivalent to "" (a null string), but this isn't guaranteed.
--
George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing: domain: grr@cbmvax.commodore.com
Commodore, Engineering Department phone: 215-431-9349 (only by moonlite)
next prev parent reply other threads:[~1991-06-12 4:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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