summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2014-01-16 21:31:26 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2014-01-16 21:31:26 (GMT)
commit132601ba46b34da9d55586ec8cf324f5d5030d2f (patch)
treede39e74936a2a12b9d4b3fcf7c8224d79876c2ae
parent0ff7eb5cdab532aa20f4551db1ed0bfab7e85289 (diff)
downloadhdf5-132601ba46b34da9d55586ec8cf324f5d5030d2f.zip
hdf5-132601ba46b34da9d55586ec8cf324f5d5030d2f.tar.gz
hdf5-132601ba46b34da9d55586ec8cf324f5d5030d2f.tar.bz2
[svn-r24635] Change some range check assertions to errors in H5HF_man_remove in an attempt
to aid in diagnosing issue HDFFV-8647. Tested: ummon
-rw-r--r--src/H5HFman.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c
index b43356f..23afb5e 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -554,12 +554,14 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
/* Decode the object offset within the heap & it's 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)