diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2019-11-20 18:02:46 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2019-11-20 18:02:46 (GMT) |
commit | 33d173d672f4affc804cf6e3c43b92693bd3ed68 (patch) | |
tree | bc72db1803d90b2bb2c8838accca329625c3a97e | |
parent | 13456df8a47fdcd8f96f170c9218e57a03066120 (diff) | |
parent | c104f4cb87a1558ab6a772967887738dc9800f0d (diff) | |
download | hdf5-33d173d672f4affc804cf6e3c43b92693bd3ed68.zip hdf5-33d173d672f4affc804cf6e3c43b92693bd3ed68.tar.gz hdf5-33d173d672f4affc804cf6e3c43b92693bd3ed68.tar.bz2 |
Merge pull request #2043 in HDFFV/hdf5 from ~NFORTNE2/hdf5_naf:seq_list_fix to develop
* commit 'c104f4cb87a1558ab6a772967887738dc9800f0d':
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 65a66cb..c506218 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -2907,7 +2907,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 */ |