diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2013-09-26 09:28:47 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2013-09-26 09:28:47 +0000 |
| commit | 5855da5a156443f470a0c446e1740ab8aaf09230 (patch) | |
| tree | fdf4c50044c5ed8556ed3a0ffc38a9fca73928f1 /src/lib/openjp2/image.c | |
| parent | 34fd4935128751aa84e8cfc0db5a9aec680ba5e7 (diff) | |
[trunk] Import patch from bug #241
Diffstat (limited to 'src/lib/openjp2/image.c')
| -rw-r--r-- | src/lib/openjp2/image.c | 2 |
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); |
