broken realloc (was Re: Safe coding practices (was Re: Bug in users command))

Larry Campbell campbell at redsox.bsw.com
Sun Jan 27 13:38:12 AEST 1991


In article <23975:Jan2516:36:5891 at kramden.acf.nyu.edu> brnstnd at 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 at 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.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list