summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2019-12-09 21:01:24 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2019-12-09 21:01:24 (GMT)
commita53cb97afb3551ce2847861f2b09ca84bb27a7bd (patch)
tree074c75e29d50c2482e6092fe27f85ea851bb3ab7
parent518f35d4341213cbfbd23e697fbdc9e9641fc03f (diff)
parent096ed7a14a6b4fe19ad9d3791e769f4a650c3042 (diff)
downloadhdf5-a53cb97afb3551ce2847861f2b09ca84bb27a7bd.zip
hdf5-a53cb97afb3551ce2847861f2b09ca84bb27a7bd.tar.gz
hdf5-a53cb97afb3551ce2847861f2b09ca84bb27a7bd.tar.bz2
Merge pull request #2115 in HDFFV/hdf5 from ~NFORTNE2/hdf5_naf:tmp_112 to hdf5_1_12
* commit '096ed7a14a6b4fe19ad9d3791e769f4a650c3042': Modify H5Ssel_iter_get_seq_list() to accept iterators that have reached the end of iteration (returning zero sequences). Previously it could cause an assertion failure.
-rw-r--r--src/H5Sselect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 43e55fd..6c8b898 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -3086,7 +3086,7 @@ H5Ssel_iter_get_seq_list(hid_t sel_iter_id, size_t maxseq, size_t maxbytes,
HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "length array pointer is NULL")
/* Get the sequences of bytes */
- if(maxseq > 0 && maxbytes > 0) {
+ if(maxseq > 0 && maxbytes > 0 && sel_iter->elmt_left > 0) {
if(H5S_SELECT_ITER_GET_SEQ_LIST(sel_iter, maxseq, maxbytes, nseq, nbytes, off, len) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "sequence length generation failed")
} /* end if */