diff options
| author | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2004-07-16 13:16:39 +0000 |
|---|---|---|
| committer | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2004-07-16 13:16:39 +0000 |
| commit | 5da1d86a035c9f256d3e8e6accb7a7bb493df48d (patch) | |
| tree | fa5196922af71a2b4f4212b2d3c1e4b7586a6b2c | |
| parent | 54b04573f9e33dfd9269e034a823a73df1775639 (diff) | |
Bug on jp2_struct->comps memory allocation fixed
| -rw-r--r-- | libopenjpeg/jp2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c index e1110ef0..a7f9fddc 100644 --- a/libopenjpeg/jp2.c +++ b/libopenjpeg/jp2.c @@ -82,7 +82,7 @@ int jp2_init_stdjp2(jp2_struct_t * jp2_struct, j2k_image_t * img) jp2_struct->h = img->y1 - img->y0; // HEIGHT jp2_struct->w = img->x1 - img->x0; // WIDTH jp2_struct->numcomps = img->numcomps; // NC - jp2_struct->comps = (jp2_comps_t *) malloc(sizeof(jp2_comps_t)); + jp2_struct->comps = (jp2_comps_t *) malloc(jp2_struct->numcomps * sizeof(jp2_comps_t)); depth_0 = img->comps[0].prec - 1; sign = img->comps[0].sgnd; |
