summaryrefslogtreecommitdiffstats
path: root/src/H5Odrvinfo.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/H5Odrvinfo.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/H5Odrvinfo.c')
-rw-r--r--src/H5Odrvinfo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index 159c950..eb678e4 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -101,7 +101,7 @@ H5O_drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info message")
/* Retrieve driver name */
- HDmemcpy(mesg->name, p, 8);
+ H5MM_memcpy(mesg->name, p, 8);
mesg->name[8] = '\0';
p += 8;
@@ -116,7 +116,7 @@ H5O_drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
} /* end if */
/* Copy encoded driver info into buffer */
- HDmemcpy(mesg->buf, p, mesg->len);
+ H5MM_memcpy(mesg->buf, p, mesg->len);
/* Set return value */
ret_value = (void *)mesg;
@@ -152,11 +152,11 @@ H5O_drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_share
/* Store version, driver name, buffer length, & encoded buffer */
*p++ = H5O_DRVINFO_VERSION;
- HDmemcpy(p, mesg->name, 8);
+ H5MM_memcpy(p, mesg->name, 8);
p += 8;
HDassert(mesg->len <= 65535);
UINT16ENCODE(p, mesg->len);
- HDmemcpy(p, mesg->buf, mesg->len);
+ H5MM_memcpy(p, mesg->buf, mesg->len);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_drvinfo_encode() */
@@ -200,7 +200,7 @@ H5O_drvinfo_copy(const void *_mesg, void *_dest)
dest = (H5O_drvinfo_t *)H5MM_xfree(dest);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
} /* end if */
- HDmemcpy(dest->buf, mesg->buf, mesg->len);
+ H5MM_memcpy(dest->buf, mesg->buf, mesg->len);
/* Set return value */
ret_value = dest;