diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2019-03-16 15:06:52 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2019-03-16 15:06:52 (GMT) |
commit | a98747c0f94386f7505210e78cd4b385682b0eba (patch) | |
tree | 003daa33b1f5101e9982c574eb5b16bdf3bdc3fe /src/H5Dcompact.c | |
parent | d2591ce377bb027d210a100c5a738e3cdd82378e (diff) | |
download | hdf5-a98747c0f94386f7505210e78cd4b385682b0eba.zip hdf5-a98747c0f94386f7505210e78cd4b385682b0eba.tar.gz hdf5-a98747c0f94386f7505210e78cd4b385682b0eba.tar.bz2 |
Added an H5MM_memcpy call that checks for buffer overlap.
Diffstat (limited to 'src/H5Dcompact.c')
-rw-r--r-- | src/H5Dcompact.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 651aaf4..df61856 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -529,7 +529,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds if(NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - HDmemcpy(buf, storage_src->buf, storage_src->size); + H5MM_memcpy(buf, storage_src->buf, storage_src->size); /* allocate temporary bkg buff for data conversion */ if(NULL == (bkg = H5FL_BLK_MALLOC(type_conv, buf_size))) @@ -540,7 +540,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") /* Copy into another buffer, to reclaim memory later */ - HDmemcpy(reclaim_buf, buf, buf_size); + H5MM_memcpy(reclaim_buf, buf, buf_size); /* Set background buffer to all zeros */ HDmemset(bkg, 0, buf_size); @@ -549,7 +549,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") - HDmemcpy(storage_dst->buf, buf, storage_dst->size); + H5MM_memcpy(storage_dst->buf, buf, storage_dst->size); if(H5D_vlen_reclaim(tid_mem, buf_space, reclaim_buf) < 0) HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data") @@ -574,11 +574,11 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds } /* end if */ else /* Type conversion not necessary */ - HDmemcpy(storage_dst->buf, storage_src->buf, storage_src->size); + H5MM_memcpy(storage_dst->buf, storage_src->buf, storage_src->size); } /* end if */ else /* Type conversion not necessary */ - HDmemcpy(storage_dst->buf, storage_src->buf, storage_src->size); + H5MM_memcpy(storage_dst->buf, storage_src->buf, storage_src->size); /* Mark destination buffer as dirty */ storage_dst->dirty = TRUE; |