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

Unified Diff: third_party/libopenjpeg20/j2k.c

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 | « third_party/libopenjpeg20/README.pdfium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libopenjpeg20/j2k.c
diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
index 6346c219073818889c62b3b73dc81c594c47b639..7712d38600c2009e2ac557106c1698dd052ea5ed 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) {
dsinclair 2016/09/19 12:59:01 Have we verified this can ever happen? It's a prec
+ return OPJ_FALSE;
+ }
if (p_tcp->ppt == 0U) {
return OPJ_TRUE;
« no previous file with comments | « third_party/libopenjpeg20/README.pdfium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698