diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2014-02-24 21:21:00 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2014-02-24 21:21:00 (GMT) |
commit | 0baea769532965a267cc7a5202a61300b50b023f (patch) | |
tree | ede969306e0355ad36d1681d3d000dc301104c5b /src | |
parent | f4781c29dafd56a6298e563391735a9b0453b515 (diff) | |
download | hdf5-0baea769532965a267cc7a5202a61300b50b023f.zip hdf5-0baea769532965a267cc7a5202a61300b50b023f.tar.gz hdf5-0baea769532965a267cc7a5202a61300b50b023f.tar.bz2 |
[svn-r24735] Port r24635 from trunk to 1.8 branch.
Note: despite the log from r24635, it was decided that this is the actual fix
for the error described in HDFFV-8647 that is not specific to BSD. This does
not address the BSD issue, which is apparently unrelated.
Tested: jam, ostrich, platypus (h5committest, apparent system issue on koala)
Log from r24635:
Change some range check assertions to errors in H5HF_man_remove in an attempt
to aid in diagnosing issue HDFFV-8647.
Tested: ummon
Diffstat (limited to 'src')
-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 9784e94..7dfcefc 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -516,12 +516,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) |