Check for invalid AAPL in H5Aopen (#2712) (#2770)

This commit is contained in:
jhendersonHDF 2023-04-17 17:11:16 -05:00 committed by GitHub
parent 9a07981148
commit 84d9885fd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,12 +135,13 @@ done:
*-------------------------------------------------------------------------
*/
void *
H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name,
hid_t H5_ATTR_UNUSED aapl_id, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req)
H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t aapl_id,
hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req)
{
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute opened */
void *ret_value;
H5P_genplist_t *plist;
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute opened */
void *ret_value;
FUNC_ENTER_PACKAGE
@ -148,6 +149,9 @@ H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const cha
if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object")
if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list")
if (loc_params->type == H5VL_OBJECT_BY_SELF) {
/* H5Aopen */
/* Open the attribute */