changeset 9211:c3c134042c0b

(gc_hash_open): Catch NULL calloc return value. Reported by Bruno Haible <bruno@clisp.org>.
author Simon Josefsson <simon@josefsson.org>
date Thu, 13 Sep 2007 11:53:38 +0000
parents d45fc20c2bc6
children 09cf746577d7
files ChangeLog lib/gc-gnulib.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Sep 12 23:24:15 2007 +0000
+++ b/ChangeLog	Thu Sep 13 11:53:38 2007 +0000
@@ -1,3 +1,8 @@
+2007-09-13  Simon Josefsson  <simon@josefsson.org>
+
+	* lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
+	Reported by Bruno Haible <bruno@clisp.org>.
+
 2007-09-12  Bruno Haible  <bruno@clisp.org>
 
 	* m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
@@ -33005,6 +33010,9 @@
 
 	* m4/isc-posix.m4: New file.
 
+<<<<<<< ChangeLog
+1998-05-10  Jim Meyering  <meyering@ascend.com>
+=======
 1998-05-10  Jim Meyering  <meyering@ascend.com>
 
 	* m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
@@ -33083,3 +33091,4 @@
   Free Software Foundation, Inc.
 Copying and distribution of this file, with or without modification,
 are permitted provided the copyright notice and this notice are preserved.
+>>>>>>> 1.1932
--- a/lib/gc-gnulib.c	Wed Sep 12 23:24:15 2007 +0000
+++ b/lib/gc-gnulib.c	Thu Sep 13 11:53:38 2007 +0000
@@ -581,6 +581,8 @@
   Gc_rc rc = GC_OK;
 
   ctx = calloc (sizeof (*ctx), 1);
+  if (!ctx)
+    return GC_MALLOC_ERROR;
 
   ctx->alg = hash;
   ctx->mode = mode;