diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2020-03-16 19:06:57 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2020-03-16 19:06:57 (GMT) |
commit | 9c93c1bb00d4325867288b3811a6bb4907a51dde (patch) | |
tree | a0f39b3725382567ebdfc8bbd72b4c5c70f0bd5c /src/H5Sall.c | |
parent | 7613f7e1aa89210bb625d59d79a6220c49a1f22c (diff) | |
parent | 81b1ed4e1724b8a6a731ab2b8fb03234a8b49d15 (diff) | |
download | hdf5-9c93c1bb00d4325867288b3811a6bb4907a51dde.zip hdf5-9c93c1bb00d4325867288b3811a6bb4907a51dde.tar.gz hdf5-9c93c1bb00d4325867288b3811a6bb4907a51dde.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; |