summaryrefslogtreecommitdiffstats
path: root/src/H5FDdirect.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-03-16 15:06:52 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-03-16 15:06:52 (GMT)
commita98747c0f94386f7505210e78cd4b385682b0eba (patch)
tree003daa33b1f5101e9982c574eb5b16bdf3bdc3fe /src/H5FDdirect.c
parentd2591ce377bb027d210a100c5a738e3cdd82378e (diff)
downloadhdf5-a98747c0f94386f7505210e78cd4b385682b0eba.zip
hdf5-a98747c0f94386f7505210e78cd4b385682b0eba.tar.gz
hdf5-a98747c0f94386f7505210e78cd4b385682b0eba.tar.bz2
Added an H5MM_memcpy call that checks for buffer overlap.
Diffstat (limited to 'src/H5FDdirect.c')
-rw-r--r--src/H5FDdirect.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 10c368a..33a0ef4 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -422,7 +422,7 @@ H5FD_direct_fapl_copy(const void *_old_fa)
HDassert(new_fa);
/* Copy the general information */
- HDmemcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
+ H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
FUNC_LEAVE_NOAPI(new_fa)
} /* end H5FD_direct_fapl_copy() */
@@ -976,12 +976,12 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
* next section of data. */
p2 = (unsigned char*)copy_buf + copy_offset;
if((copy_size + copy_offset) <= alloc_size) {
- HDmemcpy(buf, p2, copy_size);
+ H5MM_memcpy(buf, p2, copy_size);
buf = (unsigned char *)buf + copy_size;
copy_size = 0;
} /* end if */
else {
- HDmemcpy(buf, p2, alloc_size - copy_offset);
+ H5MM_memcpy(buf, p2, alloc_size - copy_offset);
buf = (unsigned char*)buf + alloc_size - copy_offset;
copy_size -= alloc_size - copy_offset;
copy_offset = 0;
@@ -1189,11 +1189,11 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
*/
p1 = (unsigned char *)copy_buf + copy_offset;
if((copy_size + copy_offset) <= alloc_size) {
- HDmemcpy(p1, p3, copy_size);
+ H5MM_memcpy(p1, p3, copy_size);
copy_size = 0;
} /* end if */
else {
- HDmemcpy(p1, p3, alloc_size - copy_offset);
+ H5MM_memcpy(p1, p3, alloc_size - copy_offset);
p3 = (const unsigned char *)p3 + (alloc_size - copy_offset);
copy_size -= alloc_size - copy_offset;
copy_offset = 0;