diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2020-03-16 19:06:57 (GMT) |
---|---|---|
committer | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2020-03-16 19:33:52 (GMT) |
commit | 3b2db5eb19594fa44357e63e36f3b294fbae463d (patch) | |
tree | 10bf21ba25e395c1a985a5ff333a79da9541d65b /src/H5Snone.c | |
parent | fbda71a49e85648fcf45b491b5eebea74d4e5941 (diff) | |
download | hdf5-3b2db5eb19594fa44357e63e36f3b294fbae463d.zip hdf5-3b2db5eb19594fa44357e63e36f3b294fbae463d.tar.gz hdf5-3b2db5eb19594fa44357e63e36f3b294fbae463d.tar.bz2 |
Merge pull request #2451 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/develop_seg_fault_sel_compat to develop
* commit '81b1ed4e1724b8a6a731ab2b8fb03234a8b49d15':
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/H5Snone.c')
-rw-r--r-- | src/H5Snone.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5Snone.c b/src/H5Snone.c index 0949b2a..630d1d5 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -648,6 +648,9 @@ H5S__none_deserialize(H5S_t **space, const uint8_t **p) /* Decode version */ UINT32DECODE(*p, version); + if(version < H5S_NONE_VERSION_1 || version > H5S_NONE_VERSION_LATEST) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for none selection") + /* Skip over the remainder of the header */ *p += 8; |