summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-12-05 21:09:23 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-12-05 21:09:23 (GMT)
commit1e10b3212ed5904b69d9f4c4bcb4d0122dfd7c77 (patch)
tree30e78a4e6884636a399ab032c06e7121a1c29595 /src/H5Shyper.c
parentc7b3d6d6a5c1d376812e17c0ddb26f55334a2c59 (diff)
downloadhdf5-1e10b3212ed5904b69d9f4c4bcb4d0122dfd7c77.zip
hdf5-1e10b3212ed5904b69d9f4c4bcb4d0122dfd7c77.tar.gz
hdf5-1e10b3212ed5904b69d9f4c4bcb4d0122dfd7c77.tar.bz2
Two fixes:
(1) Set the version for reference datatype messge to H5O_DTYPE_VERSION_4. (2) Verify the decoded version for hyperslab selection.
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index acb8b87..1e1538e 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)++;