diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-02-20 20:12:51 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-02-20 20:12:51 (GMT) |
commit | ec361559b3a78126e70ec4abd74a98d5faff53f0 (patch) | |
tree | 828740a9fc0139e8dc1ac405a5b0e62e28188321 /src/H5Osdspace.c | |
parent | 65c670d39cb5466185f23e6a39a743f02e4f4ae8 (diff) | |
parent | 9f2802f23cad8dd16f21b85c0dd9c97008a51f76 (diff) | |
download | hdf5-ec361559b3a78126e70ec4abd74a98d5faff53f0.zip hdf5-ec361559b3a78126e70ec4abd74a98d5faff53f0.tar.gz hdf5-ec361559b3a78126e70ec4abd74a98d5faff53f0.tar.bz2 |
Merge branch 'develop' into avoid_trunc_beta
Diffstat (limited to 'src/H5Osdspace.c')
-rw-r--r-- | src/H5Osdspace.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index 3fe5652..12a9bb6 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -441,7 +441,7 @@ H5O_sdspace_free(void *mesg) */ static herr_t H5O_sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, - hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void *_udata) + hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void *_udata) { const H5S_extent_t *src_space_extent = (const H5S_extent_t *)mesg_src; /* Source dataspace extent */ H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */ @@ -452,6 +452,13 @@ H5O_sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, /* check args */ HDassert(file_src); HDassert(src_space_extent); + HDassert(cpy_info); + HDassert(cpy_info->file_dst); + + /* Check to ensure that the version of the message to be copied does not exceed + the message version allowed by the destination file's high bound */ + if(src_space_extent->version > H5O_sdspace_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "dataspace message version out of bounds") /* If the user data is non-NULL, assume we are copying a dataset * and make a copy of the dataspace extent for later in the object copying |