summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/opj_malloc.c
diff options
context:
space:
mode:
authormayeut <mayeut@users.noreply.github.com>2015-10-17 01:30:23 +0200
committermayeut <mayeut@users.noreply.github.com>2015-10-17 01:30:23 +0200
commit83249c318fa9a133cb992973f84e15d3ba3182e0 (patch)
tree9ab0a33ee1819fdf5fe9dc85dcae3200ba55aa7f /src/lib/openjp2/opj_malloc.c
parentdd81b5892d5d0709ab981c9311adca81a7a4cd52 (diff)
Fixed crash on encoding
Update #624 Update #625
Diffstat (limited to 'src/lib/openjp2/opj_malloc.c')
-rw-r--r--src/lib/openjp2/opj_malloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/openjp2/opj_malloc.c b/src/lib/openjp2/opj_malloc.c
index 30d89258..2636f076 100644
--- a/src/lib/openjp2/opj_malloc.c
+++ b/src/lib/openjp2/opj_malloc.c
@@ -79,8 +79,7 @@ static inline void *opj_aligned_realloc_n(void *ptr, size_t alignment, size_t si
* allocated array (eg. _msize on Windows, malloc_size on MacOS,
* malloc_usable_size on systems with glibc) */
a_ptr = opj_aligned_alloc_n(alignment, size);
- /* memory may overlap, do not use memcpy */
- memmove(a_ptr, r_ptr, size);
+ memcpy(a_ptr, r_ptr, size);
free( r_ptr );
return a_ptr;
/* _MSC_VER */