diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2020-03-13 16:22:22 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2020-03-13 16:22:22 (GMT) |
commit | 81b1ed4e1724b8a6a731ab2b8fb03234a8b49d15 (patch) | |
tree | 038db381bcae2713b24a7f1f50e73d54faad354d /src/H5Spkg.h | |
parent | a24b0c4a848c08454831ad9c561e234c1248a821 (diff) | |
download | hdf5-81b1ed4e1724b8a6a731ab2b8fb03234a8b49d15.zip hdf5-81b1ed4e1724b8a6a731ab2b8fb03234a8b49d15.tar.gz hdf5-81b1ed4e1724b8a6a731ab2b8fb03234a8b49d15.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.h | 11 |
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 */ |