diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Fio.c | 2 | ||||
-rw-r--r-- | src/H5O.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/H5Fio.c b/src/H5Fio.c index 231c4c9..c8c75b2 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -102,6 +102,7 @@ H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, HDassert(f); HDassert(f->shared); HDassert(buf); + HDassert(H5F_addr_defined(addr)); /* Check for attempting I/O on 'temporary' file address */ if(H5F_addr_le(f->shared->tmp_addr, (addr + size))) @@ -146,6 +147,7 @@ HDfprintf(stderr, "%s: write to addr = %a, size = %Zu\n", FUNC, addr, size); HDassert(f->shared); HDassert(f->intent & H5F_ACC_RDWR); HDassert(buf); + HDassert(H5F_addr_defined(addr)); /* Check for attempting I/O on 'temporary' file address */ if(H5F_addr_le(f->shared->tmp_addr, (addr + size))) @@ -1662,7 +1662,10 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) /* check args */ HDassert(loc); HDassert(loc->file); - HDassert(H5F_addr_defined(loc->addr)); + + /* Check for valid address */ + if(!H5F_addr_defined(loc->addr)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "address undefined") /* Check for write access on the file */ file_intent = H5F_INTENT(loc->file); |