mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-25 17:00:45 +08:00
Merge pull request #1763 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:memcpy_buffer_overlap_check to develop
* commit '5a6afeffd44c3ba51ce0e0fa11053c83e0807685': Put the memcpy overlap check back into H5MM.
This commit is contained in:
commit
2d1017e381
10
src/H5MM.c
10
src/H5MM.c
@ -589,13 +589,11 @@ H5MM_memcpy(void *dest, const void *src, size_t n)
|
||||
|
||||
HDassert(dest);
|
||||
HDassert(src);
|
||||
#if 0
|
||||
/* Commented out while we investigate overlapping buffers in the
|
||||
* parallel filter code (HDFFV-10735).
|
||||
*/
|
||||
HDassert((char *)dest >= (const char *)src + n || (const char *)src >= (char *)dest + n);
|
||||
#endif
|
||||
|
||||
/* Check for buffer overlap */
|
||||
HDassert((char *)dest >= (const char *)src + n || (const char *)src >= (char *)dest + n);
|
||||
|
||||
/* Copy */
|
||||
ret = HDmemcpy(dest, src, n);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret)
|
||||
|
@ -3133,7 +3133,7 @@ H5P__class_get(const H5P_genclass_t *pclass, const char *name, void *value)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size")
|
||||
|
||||
/* Copy the property value */
|
||||
HDmemcpy(value, prop->value, prop->size);
|
||||
H5MM_memcpy(value, prop->value, prop->size);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
@ -3189,7 +3189,7 @@ H5P__class_set(const H5P_genclass_t *pclass, const char *name, const void *value
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size")
|
||||
|
||||
/* Copy the property value */
|
||||
HDmemcpy(prop->value, value, prop->size);
|
||||
H5MM_memcpy(prop->value, value, prop->size);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user