Skip to content

Commit

Permalink
Merge pull request uclouvain#1303 from zodf0055980/fix#1283
Browse files Browse the repository at this point in the history
Encoder: grow again buffer size
  • Loading branch information
rouault authored Dec 4, 2020
2 parents aaff099 + 4ce7d28 commit 43dd9ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/openjp2/tcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,9 +1248,10 @@ static OPJ_BOOL opj_tcd_code_block_enc_allocate_data(opj_tcd_cblk_enc_t *
/* and +28 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 44) */
/* and +33 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 4) */
/* and +63 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 4 -IMF 2K) */
/* and +74 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 4 -n 8 -s 7,7 -I) */
/* TODO: is there a theoretical upper-bound for the compressed code */
/* block size ? */
l_data_size = 63 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
l_data_size = 74 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
(p_code_block->y1 - p_code_block->y0) * (OPJ_INT32)sizeof(OPJ_UINT32));

if (l_data_size > p_code_block->data_size) {
Expand Down

0 comments on commit 43dd9ee

Please sign in to comment.