summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-09-30 11:12:05 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-09-30 11:12:05 -0700
commitd53e6fdb0a86ca1ddb12876a60f7f2d7508b5349 (patch)
tree1d1eebf565936adff5d2d5c68741774e8d86f0eb /core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c
parent1b24b697659b9b933f336238665c835497464a0b (diff)
downloadpdfium-d53e6fdb0a86ca1ddb12876a60f7f2d7508b5349.tar.xz
Update openjpeg
BUG=407964, 414182, 413447 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/589243004
Diffstat (limited to 'core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c')
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c
index 2c3540c517..8e68668e42 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c
@@ -205,21 +205,19 @@ opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_c
OPJ_UINT32 compno;
opj_image_t *image = 00;
- image = (opj_image_t*) opj_malloc(sizeof(opj_image_t));
+ image = (opj_image_t*) opj_calloc(1,sizeof(opj_image_t));
if (image)
{
- memset(image,0,sizeof(opj_image_t));
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(image->numcomps, sizeof(opj_image_comp_t));
if (!image->comps) {
opj_image_destroy(image);
return 00;
}
- memset(image->comps,0,image->numcomps * sizeof(opj_image_comp_t));
/* create the individual image components */
for(compno = 0; compno < numcmpts; compno++) {