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

Unified Diff: third_party/libopenjpeg20/0023-j2k_merge_ppt_leak.patch

Issue 2353463002: Fix memory leak in opj_j2k_merge_ppt.
Patch Set: Created 4 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 | « no previous file | third_party/libopenjpeg20/README.pdfium » ('j') | third_party/libopenjpeg20/j2k.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libopenjpeg20/0023-j2k_merge_ppt_leak.patch
diff --git a/third_party/libopenjpeg20/0023-j2k_merge_ppt_leak.patch b/third_party/libopenjpeg20/0023-j2k_merge_ppt_leak.patch
new file mode 100644
index 0000000000000000000000000000000000000000..d76bb79ffc1e93b3b50bdd5fbb948c36bfbb40d4
--- /dev/null
+++ b/third_party/libopenjpeg20/0023-j2k_merge_ppt_leak.patch
@@ -0,0 +1,16 @@
+diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
+index 6346c21..7712d38 100644
+--- a/third_party/libopenjpeg20/j2k.c
++++ b/third_party/libopenjpeg20/j2k.c
+@@ -3807,7 +3807,10 @@ static OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t * p_manager)
+ /* preconditions */
+ assert(p_tcp != 00);
+ assert(p_manager != 00);
+- assert(p_tcp->ppt_buffer == NULL);
++
++ if(p_tcp->ppt_buffer != NULL) {
++ return OPJ_FALSE;
++ }
+
+ if (p_tcp->ppt == 0U) {
+ return OPJ_TRUE;
« no previous file with comments | « no previous file | third_party/libopenjpeg20/README.pdfium » ('j') | third_party/libopenjpeg20/j2k.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698