summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2018-12-13 15:10:40 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2018-12-13 15:10:40 (GMT)
commit8faad0a9595310b9c19d99ccb4b080d859aa2359 (patch)
tree7013012f216fc962279d4785a5bc040127cf9bbf /src/H5A.c
parentafdf3094cc6577bacd004f2cb4b553b63bf503f7 (diff)
parent76c0d8c434186107176fc83a0ce4e94b584196ae (diff)
downloadhdf5-8faad0a9595310b9c19d99ccb4b080d859aa2359.zip
hdf5-8faad0a9595310b9c19d99ccb4b080d859aa2359.tar.gz
hdf5-8faad0a9595310b9c19d99ccb4b080d859aa2359.tar.bz2
Merge pull request #1369 in HDFFV/hdf5 from ~JHENDERSON/hdf5:develop to develop
* commit '76c0d8c434186107176fc83a0ce4e94b584196ae': Add test for H5Aget_info(_by_name/_by_idx) NULL info pointer align H5Aget_info behavior with H5Gget_info when null attribute pointer is supplied
Diffstat (limited to 'src/H5A.c')
-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);