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

Unified Diff: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.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
« no previous file with comments | « core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c
index e77adb3bb8ef695c81c7f2a0c7869bb3b8ac489d..6143c08a65905b31c4a6ca255aa9a06f4d42e58f 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c
@@ -57,12 +57,11 @@ opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv) {
OPJ_UINT32 numlvls;
OPJ_UINT32 n;
- tree = (opj_tgt_tree_t *) opj_malloc(sizeof(opj_tgt_tree_t));
+ tree = (opj_tgt_tree_t *) opj_calloc(1,sizeof(opj_tgt_tree_t));
if(!tree) {
fprintf(stderr, "ERROR in tgt_create while allocating tree\n");
return 00;
}
- memset(tree,0,sizeof(opj_tgt_tree_t));
tree->numleafsh = numleafsh;
tree->numleafsv = numleafsv;
@@ -92,7 +91,6 @@ opj_tgt_tree_t *opj_tgt_create(OPJ_UINT32 numleafsh, OPJ_UINT32 numleafsv) {
opj_free(tree);
return 00;
}
- memset(tree->nodes,0,tree->numnodes * sizeof(opj_tgt_node_t));
tree->nodes_size = tree->numnodes * (OPJ_UINT32)sizeof(opj_tgt_node_t);
node = tree->nodes;
« no previous file with comments | « core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698