realloc, calloc portability fixes.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 Nov 2004 23:07:53 +0000 (23:07 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 Nov 2004 23:07:53 +0000 (23:07 +0000)
lib/ChangeLog

index 35743b03ffaa17059cb508b060193a4df93bebb8..a31078e3c0f187b373ca48fdaebf801061be98ec 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
+       might fail.  Problem reported by Yoann Vandoorselaere.
+       * calloc.c (rpl_calloc): Defend against buggy calloc implementations
+       that mishandle size_t overflow.
+
 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        * canon-host.c: Include "strdup.h".