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/H5Sall.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/H5Sall.c')
-rw-r--r-- | src/H5Sall.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5Sall.c b/src/H5Sall.c index 4a4245d..77fb582 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -690,6 +690,9 @@ H5S__all_deserialize(H5S_t **space, const uint8_t **p) /* Decode version */ UINT32DECODE(*p, version); + if(version < H5S_ALL_VERSION_1 || version > H5S_ALL_VERSION_LATEST) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for all selection") + /* Skip over the remainder of the header */ *p += 8; |