diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-05-15 13:44:01 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-05-15 13:44:01 (GMT) |
commit | ae07c9ba2429a9c49291bcd9f02c0ce36b0a60ce (patch) | |
tree | 4d46d5261a489989d24f5d3665217beb305253fc | |
parent | 4d012b345c16ff20f09e51486ee2ecf029a3bbc4 (diff) | |
download | hdf5-ae07c9ba2429a9c49291bcd9f02c0ce36b0a60ce.zip hdf5-ae07c9ba2429a9c49291bcd9f02c0ce36b0a60ce.tar.gz hdf5-ae07c9ba2429a9c49291bcd9f02c0ce36b0a60ce.tar.bz2 |
Replaced a few calls to HDmemcpy with H5MM_memcpy, which does overlap
checking.
-rw-r--r-- | src/H5Odeprec.c | 12 | ||||
-rw-r--r-- | src/H5Tref.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c index e43213d..aca0d59 100644 --- a/src/H5Odeprec.c +++ b/src/H5Odeprec.c @@ -189,10 +189,10 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2, /* Set the native fields */ if(shim_data->fields & H5O_INFO_HDR) - HDmemcpy(&(oinfo.hdr), &(nat_info.hdr), sizeof(H5O_hdr_info_t)); + H5MM_memcpy(&(oinfo.hdr), &(nat_info.hdr), sizeof(H5O_hdr_info_t)); if(shim_data->fields & H5O_INFO_META_SIZE) { - HDmemcpy(&(oinfo.meta_size.obj), &(nat_info.meta_size.obj), sizeof(H5_ih_info_t)); - HDmemcpy(&(oinfo.meta_size.attr), &(nat_info.meta_size.attr), sizeof(H5_ih_info_t)); + H5MM_memcpy(&(oinfo.meta_size.obj), &(nat_info.meta_size.obj), sizeof(H5_ih_info_t)); + H5MM_memcpy(&(oinfo.meta_size.attr), &(nat_info.meta_size.attr), sizeof(H5_ih_info_t)); } } @@ -279,10 +279,10 @@ H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, /* Set the native fields */ if(fields & H5O_INFO_HDR) - HDmemcpy(&(oinfo->hdr), &(nat_info.hdr), sizeof(H5O_hdr_info_t)); + H5MM_memcpy(&(oinfo->hdr), &(nat_info.hdr), sizeof(H5O_hdr_info_t)); if(fields & H5O_INFO_META_SIZE) { - HDmemcpy(&(oinfo->meta_size.obj), &(nat_info.meta_size.obj), sizeof(H5_ih_info_t)); - HDmemcpy(&(oinfo->meta_size.attr), &(nat_info.meta_size.attr), sizeof(H5_ih_info_t)); + H5MM_memcpy(&(oinfo->meta_size.obj), &(nat_info.meta_size.obj), sizeof(H5_ih_info_t)); + H5MM_memcpy(&(oinfo->meta_size.attr), &(nat_info.meta_size.attr), sizeof(H5_ih_info_t)); } /* end if */ } /* end if */ diff --git a/src/H5Tref.c b/src/H5Tref.c index f97b78a..b357baa 100644 --- a/src/H5Tref.c +++ b/src/H5Tref.c @@ -800,7 +800,7 @@ H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_ HDassert(dst_size); /* Copy header manually */ - HDmemcpy(q, p, H5R_ENCODE_HEADER_SIZE); + H5MM_memcpy(q, p, H5R_ENCODE_HEADER_SIZE); p += H5R_ENCODE_HEADER_SIZE; q += H5R_ENCODE_HEADER_SIZE; blob_size -= H5R_ENCODE_HEADER_SIZE; @@ -860,7 +860,7 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, } /* end if */ /* Copy header manually so that it does not get encoded into the blob */ - HDmemcpy(q, p, H5R_ENCODE_HEADER_SIZE); + H5MM_memcpy(q, p, H5R_ENCODE_HEADER_SIZE); p += H5R_ENCODE_HEADER_SIZE; q += H5R_ENCODE_HEADER_SIZE; src_size -= H5R_ENCODE_HEADER_SIZE; |