diff options
author | Ben Walsh <b@wumpster.com> | 2012-06-27 20:58:37 +0100 |
---|---|---|
committer | Ben Walsh <b@wumpster.com> | 2012-06-27 20:58:37 +0100 |
commit | 2014f27622f1cab09f7e96a044722d01ffaad2ca (patch) | |
tree | 6622ec93a704114c121bed89eb5dd14917478e3c | |
parent | e15d0bdd3cc0bc0928e1f4d0b419a2fb3de02af9 (diff) | |
download | numpy-2014f27622f1cab09f7e96a044722d01ffaad2ca.tar.gz |
Fix two instances of memcpy with overlapping source and destination.
-rw-r--r-- | numpy/core/src/multiarray/lowlevel_strided_loops.c.src | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src index c57e1ccc1..af39723af 100644 --- a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src +++ b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src @@ -239,7 +239,7 @@ _strided_to_strided(char *dst, npy_intp dst_stride, NpyAuxData *NPY_UNUSED(data)) { while (N > 0) { - memcpy(dst, src, src_itemsize); + memmove(dst, src, src_itemsize); dst += dst_stride; src += src_stride; --N; @@ -312,7 +312,7 @@ _contig_to_contig(char *dst, npy_intp NPY_UNUSED(dst_stride), npy_intp N, npy_intp src_itemsize, NpyAuxData *NPY_UNUSED(data)) { - memcpy(dst, src, src_itemsize*N); + memmove(dst, src, src_itemsize*N); } |