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

Unified Diff: third_party/libopenjpeg20/0010-pi_update_decode_poc.patch

Issue 1594603004: Merge to XFA: openjpeg: Set proper upper bound for an array in opj_pi_update_decode_poc(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libopenjpeg20/0010-pi_update_decode_poc.patch
diff --git a/third_party/libopenjpeg20/0010-pi_update_decode_poc.patch b/third_party/libopenjpeg20/0010-pi_update_decode_poc.patch
new file mode 100644
index 0000000000000000000000000000000000000000..d596b76b8f5d84b7f029a62fe4c0c0881761293f
--- /dev/null
+++ b/third_party/libopenjpeg20/0010-pi_update_decode_poc.patch
@@ -0,0 +1,13 @@
+diff --git a/third_party/libopenjpeg20/pi.c b/third_party/libopenjpeg20/pi.c
+index 462e07c..9097e31 100644
+--- a/third_party/libopenjpeg20/pi.c
++++ b/third_party/libopenjpeg20/pi.c
+@@ -1028,7 +1028,7 @@ static void opj_pi_update_decode_poc (opj_pi_iterator_t * p_pi,
+ l_current_pi->poc.precno0 = 0;
+ l_current_pi->poc.resno1 = l_current_poc->resno1; /* Resolution Level Index #0 (End) */
+ l_current_pi->poc.compno1 = l_current_poc->compno1; /* Component Index #0 (End) */
+- l_current_pi->poc.layno1 = l_current_poc->layno1; /* Layer Index #0 (End) */
++ l_current_pi->poc.layno1 = opj_uint_min(l_current_poc->layno1, p_tcp->numlayers); /* Layer Index #0 (End) */
+ l_current_pi->poc.precno1 = p_max_precision;
+ ++l_current_pi;
+ ++l_current_poc;
« no previous file with comments | « no previous file | third_party/libopenjpeg20/README.pdfium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698