[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
This commit is contained in:
Mohamad Chaarawi 2014-09-25 14:30:36 -05:00
parent 52d5e22956
commit a881862802

View File

@ -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;
}