diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-09-25 19:30:36 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-09-25 19:30:36 (GMT) |
commit | a88186280275c51d91c644e0b66a0b30dc0452d8 (patch) | |
tree | 0748acb7caa83bd6f33a54a6507b79c6d352d0e1 | |
parent | 52d5e22956c37374aea7c444dd930278c0c51f32 (diff) | |
download | hdf5-a88186280275c51d91c644e0b66a0b30dc0452d8.zip hdf5-a88186280275c51d91c644e0b66a0b30dc0452d8.tar.gz hdf5-a88186280275c51d91c644e0b66a0b30dc0452d8.tar.bz2 |
[svn-r25620] Fix a bug in multi VFD when the memb_addr in H5Pset_fapl_multi is passed
as NULL. The library is supposed in that case to equally divide the
address space among all members, but there was a bug causing an
overflow in the assignment.
tested with h5commitest
-rw-r--r-- | src/H5FDmulti.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 0a899a9..4a62bd8 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -491,7 +491,7 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, } if (!memb_addr) { for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) - _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * HADDR_MAX / H5FD_MEM_NTYPES; + _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / H5FD_MEM_NTYPES); memb_addr = _memb_addr; } |