summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2014-03-03 22:54:14 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2014-03-03 22:54:14 (GMT)
commite367f64e24b95876d7c2673c7181aa12533d3f31 (patch)
treeb0386e165f5170a9b8cfdb6fcfff96d850ff52a0 /src
parentf683d9a035302bac4764ed2083d9020752ee40dc (diff)
downloadhdf5-e367f64e24b95876d7c2673c7181aa12533d3f31.zip
hdf5-e367f64e24b95876d7c2673c7181aa12533d3f31.tar.gz
hdf5-e367f64e24b95876d7c2673c7181aa12533d3f31.tar.bz2
[svn-r24757] Change assertion to condition check/error return. Should fix periodic
assertion failure in fheap test (in test that is expected to fail cleanly). Fix type in H5detect.c Tested: ostrich, platypus (h5committest - jam and koala having issues)
Diffstat (limited to 'src')
-rw-r--r--src/H5HFman.c6
-rw-r--r--src/H5detect.c2
2 files changed, 5 insertions, 3 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)
diff --git a/src/H5detect.c b/src/H5detect.c
index 0f8d051..aed7514 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -332,7 +332,7 @@ precision (detected_t *d)
if(_v1 != _v2) \
_pad_mask[_i] |= _byte_mask; \
_buf1[_i] ^= _byte_mask; \
- } /* enf for */ \
+ } /* end for */ \
\
/* Byte Order */ \
for(_i = 0, _v1 = 0.0, _v2 = 1.0; _i < (int)sizeof(TYPE); _i++) { \