diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2014-06-17 20:40:01 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2014-06-17 20:40:01 (GMT) |
commit | 611d2c89afa02204e6321849d24aed26878097f0 (patch) | |
tree | 806802afc30a3a212d94b47ad661fd3b8c91a0df /src/H5HFman.c | |
parent | 720e0c7623be9847867b9d857329ab626ee8f3e8 (diff) | |
download | hdf5-611d2c89afa02204e6321849d24aed26878097f0.zip hdf5-611d2c89afa02204e6321849d24aed26878097f0.tar.gz hdf5-611d2c89afa02204e6321849d24aed26878097f0.tar.bz2 |
[svn-r25307] Bring revisions #24698 - #24783 from trunk to revise_chunks.
Tested on jam, koala, ostrich, platypus.
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r-- | src/H5HFman.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c index 23afb5e..58dab10 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -38,7 +38,7 @@ #include "H5HFpkg.h" /* Fractal heaps */ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ -#include "H5Vprivate.h" /* Vectors and arrays */ +#include "H5VMprivate.h" /* Vectors and arrays */ /****************/ /* Local Macros */ @@ -312,12 +312,14 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, /* Decode the object offset within the heap & its length */ UINT64DECODE_VAR(id, obj_off, hdr->heap_off_size); UINT64DECODE_VAR(id, obj_len, hdr->heap_len_size); - HDassert(obj_off > 0); - HDassert(obj_len > 0); /* Check for bad offset or length */ + if(obj_off == 0) + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset") if(obj_off > hdr->man_size) HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large") + if(obj_len == 0) + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size") if(obj_len > hdr->man_dtable.cparam.max_direct_size) HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block") if(obj_len > hdr->max_man_size) |