summaryrefslogtreecommitdiffstats
path: root/src/H5HFman.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2014-03-13 22:20:47 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2014-03-13 22:20:47 (GMT)
commita14244c6a64e67f66371fd0701916ad9abdea286 (patch)
treed86d5d33e1d59f6726e6f64f3f24681edfdedf26 /src/H5HFman.c
parent41f660dd17cfc8daefa1e6e8f5f2d3693af6b020 (diff)
downloadhdf5-a14244c6a64e67f66371fd0701916ad9abdea286.zip
hdf5-a14244c6a64e67f66371fd0701916ad9abdea286.tar.gz
hdf5-a14244c6a64e67f66371fd0701916ad9abdea286.tar.bz2
[svn-r24794] Port r24757 from trunk to 1.8 branch.
Tested: ostrich, platypus (h5committest, apparent system issue on jam and koala) Log from r24635: Change assertion to condition check/error return. Should fix periodic assertion failure in fheap test (in test that is expected to fail cleanly). Fix typo in H5detect.c Tested: ostrich, platypus (h5committest - jam and koala having issues)
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r--src/H5HFman.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c
index 7dfcefc..a2de63c 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -274,12 +274,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)