summaryrefslogtreecommitdiff
path: root/third_party/libopenjpeg20/README.pdfium
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-04 12:08:43 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-04 18:50:27 +0000
commit34f735c9ef34b3bb6493016c7fbeb6df76cf31f5 (patch)
tree14200502c3b1bbff1b045da10ce8e574adb6341e /third_party/libopenjpeg20/README.pdfium
parentcf53b788ca1c097c0cbbca3dee048520eb9dabd4 (diff)
downloadpdfium-34f735c9ef34b3bb6493016c7fbeb6df76cf31f5.tar.xz
Fix undefined shift in opj_get_all_encoding_parameters
The value 1u << (l_pdx + l_level_no) is only used to calculate a minimum, so skip it when the shift doesn't even fit unsigned integer. Also use the uint min version since all values being considered are unsigned anyways. Bug: chromium:666892 Change-Id: I79c6e52022aa894033c5cdabec29c4b8313e293b Reviewed-on: https://pdfium-review.googlesource.com/4891 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'third_party/libopenjpeg20/README.pdfium')
-rw-r--r--third_party/libopenjpeg20/README.pdfium1
1 files changed, 1 insertions, 0 deletions
diff --git a/third_party/libopenjpeg20/README.pdfium b/third_party/libopenjpeg20/README.pdfium
index 9ce0c05706..a75de2cca1 100644
--- a/third_party/libopenjpeg20/README.pdfium
+++ b/third_party/libopenjpeg20/README.pdfium
@@ -39,4 +39,5 @@ Local Modifications:
0027-undefined-shift-opj_t1_decode_cblk.patch: upstream fix for a ubsan bug.
0028-upstream-check-size-in-opj_j2k_read_siz.patch: upstream patch in j2k.c.
0029-avoid-division-by-0: fix some /0 and %0 in pi.c (caused by bad shifts).
+0030-undefined-shift-opj_get_all_encoding_parameters.patch: fix undefined shift in pi.c method.
TODO(thestig): List all the other patches.