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/H5FDcore.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/H5FDcore.c')
-rw-r--r-- | src/H5FDcore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c index d1a17cd..6db8af6 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -848,7 +848,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, NULL, "image_memcpy callback failed") } /* end if */ else - HDmemcpy(file->mem, file_image_info.buffer, size); + H5MM_memcpy(file->mem, file_image_info.buffer, size); } /* end if */ /* Read in existing data from the file if there is no image */ else { @@ -1300,7 +1300,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU nbytes = MIN(size,(size_t)(file->eof-addr)); #endif /* NDEBUG */ - HDmemcpy(buf, file->mem + addr, nbytes); + H5MM_memcpy(buf, file->mem + addr, nbytes); size -= nbytes; addr += nbytes; buf = (char *)buf + nbytes; @@ -1386,7 +1386,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN } /* Write from BUF to memory */ - HDmemcpy(file->mem + addr, buf, size); + H5MM_memcpy(file->mem + addr, buf, size); /* Mark memory buffer as modified */ file->dirty = TRUE; |