diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-11-25 08:12:26 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-11-25 08:22:24 (GMT) |
commit | 96784c9873433b57de813c5afadd5d9771103686 (patch) | |
tree | c180d5c2a0163c2c273cb72b7b7df006e7be7a3f /src/H5Oattr.c | |
parent | a7ba8af0d145fee16a758ae4150316c7f2a38263 (diff) | |
parent | f3fd3f293f2734fea98f508f190bf531edc72f7a (diff) | |
download | hdf5-96784c9873433b57de813c5afadd5d9771103686.zip hdf5-96784c9873433b57de813c5afadd5d9771103686.tar.gz hdf5-96784c9873433b57de813c5afadd5d9771103686.tar.bz2 |
(1) Merge branch 'develop' into bugfix/version_bounds
(2) Add two new options to h5repack for low and high bounds as in H5Pset_libver_bounds.
(3) Modify message pre_copy callbacks so that H5Ocopy can handle version bounds check.
(4) Add version bounds check for cache image feature.
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r-- | src/H5Oattr.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c index cb802ea..5c45e82 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -622,14 +622,21 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src, +H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src, hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + const H5A_t *attr_src = (const H5A_t *)native_src; /* Source attribute */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT /* check args */ HDassert(deleted); HDassert(cpy_info); + HDassert(cpy_info->file_dst); + + if(attr_src->shared->version > H5O_attr_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "attribute message version out of bounds") /* If we are not copying attributes into the destination file, indicate * that this message should be deleted. @@ -637,7 +644,8 @@ H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED if(cpy_info->copy_without_attr) *deleted = TRUE; - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_attr_pre_copy_file() */ |