summaryrefslogtreecommitdiff
path: root/third_party/libopenjpeg20/0011-j2k_update_image_data.patch
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-09-01 13:25:16 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-05 14:10:37 +0000
commit088ca03f25fe1f6d75c0ff3b71e0ad3d018a5e0c (patch)
tree27f55db27d9112910d9219efa58474a0c2bd9b52 /third_party/libopenjpeg20/0011-j2k_update_image_data.patch
parent740bcd892d22136873b2b123b94e51bf6e77b8f9 (diff)
downloadpdfium-088ca03f25fe1f6d75c0ff3b71e0ad3d018a5e0c.tar.xz
Upgrade OpenJPEG to 2.2.0
This CL upgrades OpenJPEG by copying the files from 2.2.0 and then applying patches. Patch files that are no longer relevant are deleted. The relevant ones are applied manually due to changes in formatting in OpenJPEG. Patch 34 is added to account for opj_malloc changes in PDFium. Bug: chromium:718731 Change-Id: I3d316893eab5e235c9f71222a6818b8ae0c98383 Reviewed-on: https://pdfium-review.googlesource.com/12770 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'third_party/libopenjpeg20/0011-j2k_update_image_data.patch')
-rw-r--r--third_party/libopenjpeg20/0011-j2k_update_image_data.patch24
1 files changed, 12 insertions, 12 deletions
diff --git a/third_party/libopenjpeg20/0011-j2k_update_image_data.patch b/third_party/libopenjpeg20/0011-j2k_update_image_data.patch
index 697c48f18b..7990fc78a3 100644
--- a/third_party/libopenjpeg20/0011-j2k_update_image_data.patch
+++ b/third_party/libopenjpeg20/0011-j2k_update_image_data.patch
@@ -1,17 +1,17 @@
diff --git a/third_party/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
-index b20f219..9056feb 100644
+index 44de79a75..8e35b33ee 100644
--- a/third_party/libopenjpeg20/j2k.c
+++ b/third_party/libopenjpeg20/j2k.c
-@@ -8211,6 +8211,12 @@ static OPJ_BOOL opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data,
- * */
- assert( l_res->x0 >= 0);
- assert( l_res->x1 >= 0);
+@@ -8914,6 +8914,12 @@ static OPJ_BOOL opj_j2k_update_image_data(opj_tcd_t * p_tcd, OPJ_BYTE * p_data,
+ * */
+ assert(l_res->x0 >= 0);
+ assert(l_res->x1 >= 0);
+
-+ /* Prevent bad casting to unsigned values in the subsequent lines. */
-+ if ( l_res->x0 < 0 || l_res->x1 < 0 || l_res->y0 < 0 || l_res->y1 < 0 ) {
-+ return OPJ_FALSE;
-+ }
++ /* Prevent bad casting to unsigned values in the subsequent lines. */
++ if ( l_res->x0 < 0 || l_res->x1 < 0 || l_res->y0 < 0 || l_res->y1 < 0 ) {
++ return OPJ_FALSE;
++ }
+
- if ( l_x0_dest < (OPJ_UINT32)l_res->x0 ) {
- l_start_x_dest = (OPJ_UINT32)l_res->x0 - l_x0_dest;
- l_offset_x0_src = 0;
+ if (l_x0_dest < (OPJ_UINT32)l_res->x0) {
+ l_start_x_dest = (OPJ_UINT32)l_res->x0 - l_x0_dest;
+ l_offset_x0_src = 0;