summaryrefslogtreecommitdiffstats
path: root/src/H5Spkg.h
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2020-03-13 16:22:22 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:31:56 (GMT)
commit1612e90c2b7c137d1dcea192e2e386ec88e18eac (patch)
treeb47ffecac9323a11a54d7e0c2b1bc8042670c772 /src/H5Spkg.h
parent313501fd17addcab9799695fceb962599eed327c (diff)
downloadhdf5-1612e90c2b7c137d1dcea192e2e386ec88e18eac.zip
hdf5-1612e90c2b7c137d1dcea192e2e386ec88e18eac.tar.gz
hdf5-1612e90c2b7c137d1dcea192e2e386ec88e18eac.tar.bz2
Fix issues when deserializing point/all/none selection with version beyond the library's supported version:
(1) Verify the decoded version before proceeding further with deserialization (2) Close the dataspace if errors occurred after opening the dataspace
Diffstat (limited to 'src/H5Spkg.h')
-rw-r--r--src/H5Spkg.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index e139bce..da2dd4a 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -47,14 +47,17 @@
#define H5S_HYPER_VERSION_LATEST H5S_HYPER_VERSION_3
/* Versions for H5S_SEL_POINTS selection info */
-#define H5S_POINT_VERSION_1 1
-#define H5S_POINT_VERSION_2 2
+#define H5S_POINT_VERSION_1 1
+#define H5S_POINT_VERSION_2 2
+#define H5S_POINT_VERSION_LATEST H5S_POINT_VERSION_2
/* Versions for H5S_SEL_NONE selection info */
-#define H5S_NONE_VERSION_1 1
+#define H5S_NONE_VERSION_1 1
+#define H5S_NONE_VERSION_LATEST H5S_NONE_VERSION_1
/* Versions for H5S_SEL_ALL selection info */
-#define H5S_ALL_VERSION_1 1
+#define H5S_ALL_VERSION_1 1
+#define H5S_ALL_VERSION_LATEST H5S_ALL_VERSION_1
/* Encoded size of selection info for H5S_SEL_POINTS/H5S_SEL_HYPER */
#define H5S_SELECT_INFO_ENC_SIZE_2 0x02 /* 2 bytes: 16 bits */