summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2019-12-09 15:18:56 (GMT)
committerkmu <kmu@hdfgroup.org>2019-12-09 15:18:56 (GMT)
commit8b51394f3841012f3c06bf380082a83f66a68168 (patch)
treecfb41461a5f1f9bc14e8f3118ce541e1997aa485 /src/H5Shyper.c
parent189935ff260cae6fb4e061fa68bd7b93e219c635 (diff)
parent1f871e23b7c3fdec925004f2cd39d3a2cdd8decb (diff)
downloadhdf5-8b51394f3841012f3c06bf380082a83f66a68168.zip
hdf5-8b51394f3841012f3c06bf380082a83f66a68168.tar.gz
hdf5-8b51394f3841012f3c06bf380082a83f66a68168.tar.bz2
Merge branch 'develop' into bugfix/intel_warnings
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 4796fb9..dc97ea2 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -4265,6 +4265,9 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p)
/* Decode version */
UINT32DECODE(pp, version);
+ if(version < H5S_HYPER_VERSION_1 || version > H5S_HYPER_VERSION_LATEST)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for hyperslab selection")
+
if(version >= (uint32_t)H5S_HYPER_VERSION_2) {
/* Decode flags */
flags = *(pp)++;
@@ -11503,7 +11506,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
HDassert(src_intersect_space);
HDassert(proj_space);
- /* Assert that src_space and src_intersect_space have same extent and there
+ /* Assert that src_space and src_intersect_space have same rank and there
* are no point selections */
HDassert(H5S_GET_EXTENT_NDIMS(src_space) == H5S_GET_EXTENT_NDIMS(src_intersect_space));
HDassert(H5S_GET_SELECT_NPOINTS(src_space) == H5S_GET_SELECT_NPOINTS(dst_space));