summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/image.c
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2013-09-26 09:28:47 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2013-09-26 09:28:47 +0000
commit5855da5a156443f470a0c446e1740ab8aaf09230 (patch)
treefdf4c50044c5ed8556ed3a0ffc38a9fca73928f1 /src/lib/openjp2/image.c
parent34fd4935128751aa84e8cfc0db5a9aec680ba5e7 (diff)
[trunk] Import patch from bug #241
Diffstat (limited to 'src/lib/openjp2/image.c')
-rw-r--r--src/lib/openjp2/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/openjp2/image.c b/src/lib/openjp2/image.c
index 7e48de1a..1b14f685 100644
--- a/src/lib/openjp2/image.c
+++ b/src/lib/openjp2/image.c
@@ -40,7 +40,7 @@ opj_image_t* OPJ_CALLCONV opj_image_create(OPJ_UINT32 numcmpts, opj_image_cmptpa
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);