Blame SOURCES/gdbm-1.10-zeroheaders.patch

ec97eb
diff -up gdbm-1.10/src/falloc.c.zeroheaders gdbm-1.10/src/falloc.c
ec97eb
--- gdbm-1.10/src/falloc.c.zeroheaders	2011-11-11 11:59:11.000000000 +0100
ec97eb
+++ gdbm-1.10/src/falloc.c	2011-11-14 17:34:32.487604027 +0100
ec97eb
@@ -255,7 +255,7 @@ push_avail_block (GDBM_FILE dbf)
ec97eb
 
ec97eb
 
ec97eb
   /* Split the header block. */
ec97eb
-  temp = (avail_block *) malloc (av_size);
ec97eb
+  temp = (avail_block *) calloc (1, av_size);
ec97eb
   if (temp == NULL) _gdbm_fatal (dbf, _("malloc error"));
ec97eb
   /* Set the size to be correct AFTER the pop_avail_block. */
ec97eb
   temp->size = dbf->header->avail.size;
ec97eb
diff -up gdbm-1.10/src/gdbmopen.c.zeroheaders gdbm-1.10/src/gdbmopen.c
ec97eb
--- gdbm-1.10/src/gdbmopen.c.zeroheaders	2011-11-11 19:39:42.000000000 +0100
ec97eb
+++ gdbm-1.10/src/gdbmopen.c	2011-11-14 17:33:24.867608650 +0100
ec97eb
@@ -264,7 +264,7 @@ gdbm_open (const char *file, int block_s
ec97eb
 	(dbf->header->block_size - sizeof (hash_bucket))
ec97eb
 	/ sizeof (bucket_element) + 1;
ec97eb
       dbf->header->bucket_size  = dbf->header->block_size;
ec97eb
-      dbf->bucket = (hash_bucket *) malloc (dbf->header->bucket_size);
ec97eb
+      dbf->bucket = (hash_bucket *) calloc (1, dbf->header->bucket_size);
ec97eb
       if (dbf->bucket == NULL)
ec97eb
 	{
ec97eb
 	  gdbm_close (dbf);
ec97eb
@@ -456,7 +456,7 @@ _gdbm_init_cache(GDBM_FILE dbf, size_t s
ec97eb
       for(index = 0; index < size; index++)
ec97eb
         {
ec97eb
           (dbf->bucket_cache[index]).ca_bucket
ec97eb
-            = (hash_bucket *) malloc (dbf->header->bucket_size);
ec97eb
+            = (hash_bucket *) calloc (1, dbf->header->bucket_size);
ec97eb
           if ((dbf->bucket_cache[index]).ca_bucket == NULL)
ec97eb
 	    {
ec97eb
               gdbm_errno = GDBM_MALLOC_ERROR;