summaryrefslogtreecommitdiff
path: root/third_party/libopenjpeg20/0011-j2k_update_image_data.patch
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-10-23 10:30:46 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-23 22:40:23 +0000
commit826480cf599f61fe0366ab2bd5803dd53c9d0562 (patch)
treed42bca4255a2ecf484b8498b08c6132dbcffe86a /third_party/libopenjpeg20/0011-j2k_update_image_data.patch
parentebdba614b9683ddd1d50e8960639bc54c9d4bb7a (diff)
downloadpdfium-826480cf599f61fe0366ab2bd5803dd53c9d0562.tar.xz
Upgrade LibopenJPEG to 2.3chromium/3249
Bug: Change-Id: I4c968a4e5f41037d80e5dc64a1297cd2cbda31b1 Reviewed-on: https://pdfium-review.googlesource.com/16350 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@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.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/third_party/libopenjpeg20/0011-j2k_update_image_data.patch b/third_party/libopenjpeg20/0011-j2k_update_image_data.patch
index 7990fc78a3..b61324a6b4 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 44de79a75..8e35b33ee 100644
+index ad6e1b86f..bf1cb4f36 100644
--- a/third_party/libopenjpeg20/j2k.c
+++ b/third_party/libopenjpeg20/j2k.c
-@@ -8914,6 +8914,12 @@ static OPJ_BOOL opj_j2k_update_image_data(opj_tcd_t * p_tcd, OPJ_BYTE * p_data,
+@@ -9086,6 +9086,12 @@ static OPJ_BOOL opj_j2k_update_image_data(opj_tcd_t * p_tcd,
* */
- assert(l_res->x0 >= 0);
- assert(l_res->x1 >= 0);
+ assert(res_x0 >= 0);
+ assert(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 ) {
++ if ( res_x0 < 0 || res_x1 < 0 || res_y0 < 0 || 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;
+ if (l_x0_dest < (OPJ_UINT32)res_x0) {
+ l_start_x_dest = (OPJ_UINT32)res_x0 - l_x0_dest;
l_offset_x0_src = 0;