diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2019-01-09 02:32:46 (GMT) |
---|---|---|
committer | Jordan Henderson <jhenderson@hdfgroup.org> | 2019-01-09 02:32:46 (GMT) |
commit | 294d9c28476528e8aacc7cd8c62a6ff7ee50fda4 (patch) | |
tree | 0405ba1c9a008ed51ab70d5313773f9e2ef6e5b9 /src | |
parent | 56b32278c4425afd8407f5b55310beed5c957d6a (diff) | |
parent | 2d7eb9a4c3a841f7612b88f6b559792cb6143930 (diff) | |
download | hdf5-294d9c28476528e8aacc7cd8c62a6ff7ee50fda4.zip hdf5-294d9c28476528e8aacc7cd8c62a6ff7ee50fda4.tar.gz hdf5-294d9c28476528e8aacc7cd8c62a6ff7ee50fda4.tar.bz2 |
Merge pull request #1455 in HDFFV/hdf5 from ~JHENDERSON/hdf5:develop to develop
* commit '2d7eb9a4c3a841f7612b88f6b559792cb6143930':
Align behavior of H5Aget_name_by_idx with H5Aget_name when a NULL buffer is supplied
Diffstat (limited to 'src')
-rw-r--r-- | src/H5A.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -951,6 +951,8 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") if(!obj_name || !*obj_name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") + if(!name && size) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name cannot be NULL if size is non-zero") if(idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) |