summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2018-12-12 23:05:56 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2018-12-12 23:05:56 (GMT)
commit55dbf69573e5bbf2a0735e0e92d7583e56e5173e (patch)
tree4a035ec84084f6313f3a713e1c91a1555f1e6356 /src
parentafdf3094cc6577bacd004f2cb4b553b63bf503f7 (diff)
downloadhdf5-55dbf69573e5bbf2a0735e0e92d7583e56e5173e.zip
hdf5-55dbf69573e5bbf2a0735e0e92d7583e56e5173e.tar.gz
hdf5-55dbf69573e5bbf2a0735e0e92d7583e56e5173e.tar.bz2
align H5Aget_info behavior with H5Gget_info when null attribute pointer is supplied
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 0d20912..74b0148 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1046,6 +1046,8 @@ H5Aget_info(hid_t attr_id, H5A_info_t *ainfo)
/* Check arguments */
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
+ if(!ainfo)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "attribute_info parameter cannot be NULL")
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(attr_id);