diff options
| author | mayeut <mayeut@users.noreply.github.com> | 2015-10-17 01:30:23 +0200 |
|---|---|---|
| committer | mayeut <mayeut@users.noreply.github.com> | 2015-10-17 01:30:23 +0200 |
| commit | 83249c318fa9a133cb992973f84e15d3ba3182e0 (patch) | |
| tree | 9ab0a33ee1819fdf5fe9dc85dcae3200ba55aa7f /src/lib/openjp2/opj_malloc.c | |
| parent | dd81b5892d5d0709ab981c9311adca81a7a4cd52 (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.c | 3 |
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 */ |
