diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-09-25 19:32:18 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-09-25 19:32:18 (GMT) |
commit | ef316daec86d939619f9fddf6b244e6981f5c17a (patch) | |
tree | 0dbf5a12a1fba80bed192268bbfd0bf93ec969c5 /src/H5FDmulti.c | |
parent | 0773ea2f19f4338030b72ba0e99534253e38215f (diff) | |
download | hdf5-ef316daec86d939619f9fddf6b244e6981f5c17a.zip hdf5-ef316daec86d939619f9fddf6b244e6981f5c17a.tar.gz hdf5-ef316daec86d939619f9fddf6b244e6981f5c17a.tar.bz2 |
[svn-r25621] merge 25620 from trunk.
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.
Diffstat (limited to 'src/H5FDmulti.c')
-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 bd192fd..2c1984d 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -490,7 +490,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; } |