gdbm: update to 1.13.

This commit is contained in:
Michael Gehring 2017-03-14 07:27:53 +00:00
parent 09c21ca66e
commit b9c7e4574b
2 changed files with 21 additions and 30 deletions

View File

@ -5,34 +5,25 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=4457
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208927
--- src/falloc.c.zeroheaders 2011-11-11 11:59:11.000000000 +0100
+++ src/falloc.c 2011-11-14 17:34:32.487604027 +0100
@@ -255,7 +255,7 @@ push_avail_block (GDBM_FILE dbf)
--- src/falloc.c.orig 2017-03-14 07:13:25.976990206 +0000
+++ src/falloc.c 2017-03-14 07:17:27.833002683 +0000
@@ -278,7 +278,7 @@
/* Split the header block. */
- temp = (avail_block *) malloc (av_size);
+ temp = (avail_block *) calloc (1, av_size);
if (temp == NULL) _gdbm_fatal (dbf, _("malloc error"));
/* Set the size to be correct AFTER the pop_avail_block. */
temp->size = dbf->header->avail.size;
--- src/gdbmopen.c.zeroheaders 2011-11-11 19:39:42.000000000 +0100
+++ src/gdbmopen.c 2011-11-14 17:33:24.867608650 +0100
@@ -264,7 +264,7 @@ gdbm_open (const char *file, int block_s
(dbf->header->block_size - sizeof (hash_bucket))
/ sizeof (bucket_element) + 1;
dbf->header->bucket_size = dbf->header->block_size;
- dbf->bucket = (hash_bucket *) malloc (dbf->header->bucket_size);
+ dbf->bucket = (hash_bucket *) calloc (1, dbf->header->bucket_size);
if (dbf->bucket == NULL)
{
gdbm_close (dbf);
@@ -456,7 +456,7 @@ _gdbm_init_cache(GDBM_FILE dbf, size_t s
for(index = 0; index < size; index++)
temp = GDBM_DEBUG_ALLOC ("push_avail_block:malloc-failure",
- malloc (av_size));
+ calloc (1, av_size));
if (temp == NULL)
{
GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE);
--- src/gdbmopen.c.orig 2017-03-14 07:23:52.954022551 +0000
+++ src/gdbmopen.c 2017-03-14 07:26:31.950030754 +0000
@@ -529,7 +529,7 @@
{
(dbf->bucket_cache[index]).ca_bucket
- = (hash_bucket *) malloc (dbf->header->bucket_size);
+ = (hash_bucket *) calloc (1, dbf->header->bucket_size);
(dbf->bucket_cache[index]).ca_bucket =
GDBM_DEBUG_ALLOC ("_gdbm_init_cache:bucket-malloc-failure",
- malloc (dbf->header->bucket_size));
+ calloc (1, dbf->header->bucket_size));
if ((dbf->bucket_cache[index]).ca_bucket == NULL)
{
gdbm_errno = GDBM_MALLOC_ERROR;
{
GDBM_SET_ERRNO (dbf, GDBM_MALLOC_ERROR, TRUE);

View File

@ -1,6 +1,6 @@
# Template file for 'gdbm'
pkgname=gdbm
version=1.12
version=1.13
revision=1
build_style=gnu-configure
configure_args="--enable-libgdbm-compat --disable-rpath"
@ -9,7 +9,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-3"
homepage="http://www.gnu.org.ua/software/gdbm/"
distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.gz"
checksum=d97b2166ee867fd6ca5c022efee80702d6f30dd66af0e03ed092285c3af9bcea
checksum=9d252cbd7d793f7b12bcceaddda98d257c14f4d1890d851c386c37207000a253
if [ "$CROSS_BUILD" ]; then
hostmakedepends="libtool automake gettext-devel"