From a1683bd7c2cdcb8f59cad4e7bf41ad13960fcf9a Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Thu, 26 Sep 2013 09:24:55 +0000 Subject: [PATCH] [1.5] Import patch suggested in bug #241 --- libopenjpeg/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2