diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-04-01 15:42:43 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-04-01 15:42:43 (GMT) |
commit | 72e8017eadf211257caceb43095b2aed76e81632 (patch) | |
tree | 0fae8d91bc2587a7b3b44129c5afaf37d4842098 /src/H5HFman.c | |
parent | d4c2e51d1e255fde2c0b2e359078cfd0de82720a (diff) | |
parent | c86aedeba1f683daaf0289435450fd4e518fecc4 (diff) | |
download | hdf5-72e8017eadf211257caceb43095b2aed76e81632.zip hdf5-72e8017eadf211257caceb43095b2aed76e81632.tar.gz hdf5-72e8017eadf211257caceb43095b2aed76e81632.tar.bz2 |
[svn-r24940] merge from trunk.
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r-- | src/H5HFman.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c index 882d2ba..58dab10 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -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) |