Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!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 Lines: 16 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)