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