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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user