Make sure to allocate on 16bits alignement. Fix issue #624

This commit is contained in:
Mathieu Malaterre 2015-10-09 15:37:09 +02:00
parent bbef2a9da3
commit 553714a87a
1 changed files with 1 additions and 1 deletions

View File

@ -626,7 +626,7 @@ void opj_tcd_destroy(opj_tcd_t *tcd) {
OPJ_BOOL opj_alloc_tile_component_data(opj_tcd_tilecomp_t *l_tilec) OPJ_BOOL opj_alloc_tile_component_data(opj_tcd_tilecomp_t *l_tilec)
{ {
if ((l_tilec->data == 00) || ((l_tilec->data_size_needed > l_tilec->data_size) && (l_tilec->ownsData == OPJ_FALSE))) { if ((l_tilec->data == 00) || ((l_tilec->data_size_needed > l_tilec->data_size) && (l_tilec->ownsData == OPJ_FALSE))) {
l_tilec->data = (OPJ_INT32 *) opj_malloc(l_tilec->data_size_needed); l_tilec->data = (OPJ_INT32 *) opj_aligned_malloc(l_tilec->data_size_needed);
if (! l_tilec->data ) { if (! l_tilec->data ) {
return OPJ_FALSE; return OPJ_FALSE;
} }