[trunk] WIP: correct some segfault with win platform and remove a aligned allocation which produce error when a realloc is done on this pointer

This commit is contained in:
Mickael Savinaud 2011-10-11 10:09:02 +00:00
parent 990dd18474
commit a6178c1de6
3 changed files with 10 additions and 2 deletions

View File

@ -6,6 +6,7 @@ What's New for OpenJPEG
+ : added
October 11, 2011
* [mickael] WIP: correct some segfault with win platform and remove a aligned allocation which produce error when a realloc is done on this pointer.
* [mickael] WIP: add stream length value to read unknown marker size, backport 855 into V2 framework, correct memory leak into get_cstr_info
* [mickael] WIP: add output elements about decoding of jp2 files with last tile part lenght equal zero
* [mickael] WIP: correct mistake with JP2 files and manage correctly the text_GBR.jp2 filecase

View File

@ -2632,6 +2632,13 @@ opj_jp2_v2_t* jp2_create(opj_bool p_is_decoder)
return 00;
}
/* Color structure */
jp2->color.icc_profile_buf = NULL;
jp2->color.icc_profile_len = 0;
jp2->color.jp2_cdef = NULL;
jp2->color.jp2_pclr = NULL;
jp2->color.jp2_has_colr = 0;
// validation list creation
jp2->m_validation_list = opj_procedure_list_create();
if (! jp2->m_validation_list) {

View File

@ -1714,7 +1714,7 @@ opj_bool FUNCTION ( opj_tcd_v2_t *p_tcd, \
} \
\
if (l_tilec->data == 00) { \
l_tilec->data = (OPJ_INT32 *) opj_aligned_malloc(l_data_size); \
l_tilec->data = (OPJ_INT32 *) opj_malloc(l_data_size); \
if (! l_tilec->data ) { \
return OPJ_FALSE; \
} \
@ -2301,7 +2301,7 @@ void tcd_free_tile(opj_tcd_v2_t *p_tcd)
}
if (l_tile_comp->data) {
opj_aligned_free(l_tile_comp->data);
opj_free(l_tile_comp->data);
l_tile_comp->data = 00;
}
++l_tile_comp;