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

Issue 2334823002: Verify value of prec before using (Closed)

Created:
4 years, 3 months ago by dsinclair
Modified:
4 years, 3 months ago
Reviewers:
Tom Sepez, Oliver Chang
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Verify value of prec before using The fx_codec_jpx_opj code will attempt to do a 1 << (prec - 1). If the prec value is >=32 then that shift will overflow the int value. This CL adds a check that prec is < 32 before attempting the shift. BUG=chromium:633208 Committed: https://pdfium.googlesource.com/pdfium/+/db319ec6a9330e75276b873f6027caddf2a15ec0

Patch Set 1 #

Total comments: 2

Patch Set 2 : review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M core/fxcodec/codec/fx_codec_jpx_opj.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (7 generated)
dsinclair
PTAL.
4 years, 3 months ago (2016-09-12 18:33:04 UTC) #2
Tom Sepez
https://codereview.chromium.org/2334823002/diff/1/core/fxcodec/codec/fx_codec_jpx_opj.cpp File core/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/2334823002/diff/1/core/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode234 core/fxcodec/codec/fx_codec_jpx_opj.cpp:234: if (prec >= 32) what if its < 0 ...
4 years, 3 months ago (2016-09-12 18:37:36 UTC) #5
dsinclair
https://codereview.chromium.org/2334823002/diff/1/core/fxcodec/codec/fx_codec_jpx_opj.cpp File core/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/2334823002/diff/1/core/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode234 core/fxcodec/codec/fx_codec_jpx_opj.cpp:234: if (prec >= 32) On 2016/09/12 18:37:36, Tom Sepez ...
4 years, 3 months ago (2016-09-12 19:46:59 UTC) #8
Tom Sepez
lgtm
4 years, 3 months ago (2016-09-12 20:42:46 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2334823002/20001
4 years, 3 months ago (2016-09-12 20:47:17 UTC) #11
commit-bot: I haz the power
4 years, 3 months ago (2016-09-12 21:04:11 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://pdfium.googlesource.com/pdfium/+/db319ec6a9330e75276b873f6027caddf2a1...

Powered by Google App Engine
This is Rietveld 408576698