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/H5Spoint.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/H5Spoint.c')
-rw-r--r-- | src/H5Spoint.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 5e2bc8b..8259275 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -1412,6 +1412,9 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p) /* Decode version */ UINT32DECODE(pp, version); + if(version < H5S_POINT_VERSION_1 || version > H5S_POINT_VERSION_LATEST) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for point selection") + if(version >= (uint32_t)H5S_POINT_VERSION_2) /* Decode size of point info */ enc_size = *(pp)++; |