Encoder: grow again buffer size in opj_tcd_code_block_enc_allocate_data() (fixes #1283)
This commit is contained in:
parent
eaa098b59b
commit
15cf3d9581
|
@ -1245,9 +1245,10 @@ static OPJ_BOOL opj_tcd_code_block_enc_allocate_data(opj_tcd_cblk_enc_t *
|
||||||
/* and actually +2 required for https://github.com/uclouvain/openjpeg/issues/982 */
|
/* and actually +2 required for https://github.com/uclouvain/openjpeg/issues/982 */
|
||||||
/* and +7 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 3) */
|
/* and +7 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 3) */
|
||||||
/* and +26 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 7) */
|
/* and +26 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 7) */
|
||||||
|
/* and +28 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 44) */
|
||||||
/* TODO: is there a theoretical upper-bound for the compressed code */
|
/* TODO: is there a theoretical upper-bound for the compressed code */
|
||||||
/* block size ? */
|
/* block size ? */
|
||||||
l_data_size = 26 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
|
l_data_size = 28 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
|
||||||
(p_code_block->y1 - p_code_block->y0) * (OPJ_INT32)sizeof(OPJ_UINT32));
|
(p_code_block->y1 - p_code_block->y0) * (OPJ_INT32)sizeof(OPJ_UINT32));
|
||||||
|
|
||||||
if (l_data_size > p_code_block->data_size) {
|
if (l_data_size > p_code_block->data_size) {
|
||||||
|
|
Loading…
Reference in New Issue