Xref: utzoo comp.bugs.4bsd:1681 comp.std.c:4199 comp.lang.c:35541 Path: utzoo!utgpu!watserv1!watmath!att!linac!uwm.edu!spool2.mu.edu!think.com!redsox!campbell From: campbell@redsox.bsw.com (Larry Campbell) Newsgroups: comp.bugs.4bsd,comp.std.c,comp.lang.c Subject: broken realloc (was Re: Safe coding practices (was Re: Bug in users command)) Message-ID: <1616@redsox.bsw.com> Date: 27 Jan 91 02:38:12 GMT References: <22311:Jan2502:34:1191@kramden.acf.nyu.edu> <22879@well.sf.ca.us> <23975:Jan2516:36:5891@kramden.acf.nyu.edu> Reply-To: campbell@redsox.bsw.com (Larry Campbell) Organization: The Boston Software Works, Inc. Lines: 16 In article <23975:Jan2516:36:5891@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: - -Some versions of realloc() return the original pointer rather than 0 if -they run out of memory. So you have to code the malloc()/bcopy()/free() -sequence yourself if you want error checking. Really? This is obviously Evil and Rude and Broken and should have been Reported to the Proper Authorities. I am curious, since we have to write code for a lot of different platforms. Do you know of any platforms that have this particular bug? -- Larry Campbell The Boston Software Works, Inc., 120 Fulton Street campbell@redsox.bsw.com Boston, Massachusetts 02109 (USA) The U.S. Constitution may not be perfect, but it sure beats whatever we're using right now.