summaryrefslogtreecommitdiffstats
path: root/src/H5Oalloc.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/H5Oalloc.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/H5Oalloc.c')
-rw-r--r--src/H5Oalloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 23dd928..090df18 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -949,7 +949,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null,
* # at the beginning of the chunk image.
*/
if(oh->version > H5O_VERSION_1) {
- HDmemcpy(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
+ H5MM_memcpy(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
p += H5_SIZEOF_MAGIC;
} /* end if */
@@ -988,7 +988,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null,
HDassert(curr_msg->type->id != H5O_CONT_ID);
/* Copy the raw data */
- HDmemcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
+ H5MM_memcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Update the message info */
@@ -1044,7 +1044,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null,
null_msg->chunkno = oh->mesg[found_msg->msgno].chunkno;
/* Copy the message to move (& its prefix) to its new location */
- HDmemcpy(p, oh->mesg[found_msg->msgno].raw - H5O_SIZEOF_MSGHDR_OH(oh),
+ H5MM_memcpy(p, oh->mesg[found_msg->msgno].raw - H5O_SIZEOF_MSGHDR_OH(oh),
oh->mesg[found_msg->msgno].raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Switch moved message to point to new location */
@@ -1519,7 +1519,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
move_size = curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
/* Move message out of deleted chunk */
- HDmemcpy(move_start, curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), move_size);
+ H5MM_memcpy(move_start, curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), move_size);
curr_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
curr_msg->chunkno = cont_chunkno;
chk_dirtied = TRUE;
@@ -1791,7 +1791,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
} /* end if */
/* Copy raw data for non-null message to new chunk */
- HDmemcpy(null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
+ H5MM_memcpy(null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
/* Point non-null message at null message's space */
curr_msg->chunkno = null_msg->chunkno;