summaryrefslogtreecommitdiffstats
path: root/src/H5Fistore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-06-21 16:53:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-06-21 16:53:39 (GMT)
commit4402923400e705eac6d28f97518bf18c536f6c80 (patch)
treed6e4254a561072885795c0f7881ccddbbfd79895 /src/H5Fistore.c
parent8263f168f703f8a680a49419a0053c384abec4c3 (diff)
downloadhdf5-4402923400e705eac6d28f97518bf18c536f6c80.zip
hdf5-4402923400e705eac6d28f97518bf18c536f6c80.tar.gz
hdf5-4402923400e705eac6d28f97518bf18c536f6c80.tar.bz2
[svn-r4038] Purpose:
Code clean/bug fix Description: H5FL (free-list manager) code currently is taking an hsize_t as the size of a memory block to allocate. On many machines, the size of an hsize_t is greater than the size of a size_t, potentially leading to incorrect memory allocations in rare circumstances. Solution: Changed hsize_t parameters and variables to size_t. Platforms tested: FreeBSD 4.3 (hawkwind)
Diffstat (limited to 'src/H5Fistore.c')
-rw-r--r--src/H5Fistore.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 4ba52f4..95e4f46 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -220,7 +220,7 @@ H5F_istore_chunk_alloc(size_t chunk_size)
FUNC_ENTER(H5F_istore_chunk_alloc, NULL);
- ret_value=H5FL_BLK_ALLOC(istore_chunk,(hsize_t)chunk_size,0);
+ ret_value=H5FL_BLK_ALLOC(istore_chunk,chunk_size,0);
FUNC_LEAVE(ret_value);
} /* end H5F_istore_chunk_alloc() */
@@ -280,7 +280,7 @@ H5F_istore_chunk_realloc(void *chunk, size_t new_size)
FUNC_ENTER(H5F_istore_chunk_realloc, NULL);
- ret_value=H5FL_BLK_REALLOC(istore_chunk,chunk,(hsize_t)new_size);
+ ret_value=H5FL_BLK_REALLOC(istore_chunk,chunk,new_size);
FUNC_LEAVE(ret_value);
} /* end H5F_istore_chunk_realloc() */
@@ -907,7 +907,7 @@ H5F_istore_init (H5F_t *f)
if (f->shared->rdcc_nbytes>0 && f->shared->rdcc_nelmts>0) {
rdcc->nslots = f->shared->rdcc_nelmts;
assert(rdcc->nslots>=0);
- rdcc->slot = H5FL_ARR_ALLOC (H5F_rdcc_ent_ptr_t,(hsize_t)rdcc->nslots,1);
+ rdcc->slot = H5FL_ARR_ALLOC (H5F_rdcc_ent_ptr_t,rdcc->nslots,1);
if (NULL==rdcc->slot) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");