From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,e1ee64db7e032a4e X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1991-06-13 04:28:43 PST Path: gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!lll-winken!uunet!cbmvax!grr From: grr@cbmvax.commodore.com (George Robbins) Newsgroups: comp.sys.dec Subject: Re: strcat(foo,NULL) core dumps on Ultrix Keywords: dec c strcat Message-ID: <22346@cbmvax.commodore.com> Date: 12 Jun 91 04:34:33 GMT References: <966@sdrc.COM> Reply-To: grr@cbmvax.commodore.com (George Robbins) Organization: Commodore, West Chester, PA 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)