Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c

Issue 589243004: Update openjpeg (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Update to openjpeg r2891 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c
index 4c8aae621eb845eedd865592c7b0c8f462fa33f9..b9a8b4a7d2a8d508635c6663a490094528176fc5 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c
@@ -39,22 +39,19 @@
opj_procedure_list_t * opj_procedure_list_create()
{
/* memory allocation */
- opj_procedure_list_t * l_validation = (opj_procedure_list_t *) opj_malloc(sizeof(opj_procedure_list_t));
+ opj_procedure_list_t * l_validation = (opj_procedure_list_t *) opj_calloc(1,sizeof(opj_procedure_list_t));
if (! l_validation)
{
return 00;
}
/* initialization */
- memset(l_validation,0,sizeof(opj_procedure_list_t));
l_validation->m_nb_max_procedures = OPJ_VALIDATION_SIZE;
- l_validation->m_procedures = (opj_procedure*)opj_malloc(
- OPJ_VALIDATION_SIZE * sizeof(opj_procedure));
+ l_validation->m_procedures = (opj_procedure*)opj_calloc(OPJ_VALIDATION_SIZE, sizeof(opj_procedure));
if (! l_validation->m_procedures)
{
opj_free(l_validation);
return 00;
}
- memset(l_validation->m_procedures,0,OPJ_VALIDATION_SIZE * sizeof(opj_procedure));
return l_validation;
}
« no previous file with comments | « core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c ('k') | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698