diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2013-09-26 09:24:55 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2013-09-26 09:24:55 +0000 |
| commit | a1683bd7c2cdcb8f59cad4e7bf41ad13960fcf9a (patch) | |
| tree | b9332b34b2fafb2a8ebfc9d4532e3ecf74e1f7d5 | |
| parent | f968a70e22176e1d11535a9cc8fb549dc37496bb (diff) | |
[1.5] Import patch suggested in bug #241
| -rw-r--r-- | libopenjpeg/image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopenjpeg/image.c b/libopenjpeg/image.c index a4d2c010..579fd73d 100644 --- a/libopenjpeg/image.c +++ b/libopenjpeg/image.c @@ -40,7 +40,7 @@ opj_image_t* OPJ_CALLCONV opj_image_create(int numcmpts, opj_image_cmptparm_t *c image->color_space = clrspc; image->numcomps = numcmpts; /* allocate memory for the per-component information */ - image->comps = (opj_image_comp_t*)opj_malloc(image->numcomps * sizeof(opj_image_comp_t)); + image->comps = (opj_image_comp_t*)opj_calloc(1,image->numcomps * sizeof(opj_image_comp_t)); if(!image->comps) { fprintf(stderr,"Unable to allocate memory for image.\n"); opj_image_destroy(image); |
