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

Issue 489703004: Bounds check before fixed-size memcmp() in CJPX_Decoder::Init(). (Closed)

Created:
6 years, 3 months ago by Tom Sepez
Modified:
6 years, 3 months ago
Reviewers:
Bo Xu, jun_fang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Visibility:
Public.

Description

Bounds check before fixed-size memcmp() in CJPX_Decoder::Init(). BUG=407476 R=jun_fang@foxitsoftware.com Committed: https://pdfium.googlesource.com/pdfium/+/96f8786

Patch Set 1 #

Total comments: 3

Patch Set 2 : use string constant. #

Patch Set 3 : Earlier test, test !src_data #

Patch Set 4 : Untabify #

Total comments: 1

Patch Set 5 : Address Jun's comments. #

Total comments: 2

Patch Set 6 : Fix silly typos. #

Total comments: 1

Patch Set 7 : Reduce scope of szJP2Header. #

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

Messages

Total messages: 15 (0 generated)
Tom Sepez
tsepez@chromium.org changed reviewers: + jun_fang@foxitsoftware.com
6 years, 3 months ago (2014-08-26 19:40:59 UTC) #1
Tom Sepez
Jun, please review.
6 years, 3 months ago (2014-08-26 19:40:59 UTC) #2
Bo Xu
On 2014/08/26 19:40:59, Tom Sepez wrote: > Jun, please review. Hi, Tom, I was looking ...
6 years, 3 months ago (2014-08-26 20:09:29 UTC) #3
Tom Sepez
Hi Bo, that's fine. I'll introduce a constant for the strings so that we won't ...
6 years, 3 months ago (2014-08-26 21:02:38 UTC) #4
Tom Sepez
On 2014/08/26 21:02:38, Tom Sepez wrote: > Hi Bo, that's fine. I'll introduce a constant ...
6 years, 3 months ago (2014-08-26 21:03:05 UTC) #5
jun_fang
Please see my comments. https://codereview.chromium.org/489703004/diff/1/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/489703004/diff/1/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode584 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:584: opj_dparameters_t parameters; if (!src_data || ...
6 years, 3 months ago (2014-08-26 21:48:09 UTC) #6
Tom Sepez
See PS #3. I'm not sure what naming convention we're eventually going to adopt for ...
6 years, 3 months ago (2014-08-26 22:00:07 UTC) #7
jun_fang
https://codereview.chromium.org/489703004/diff/1/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/489703004/diff/1/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode584 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:584: opj_dparameters_t parameters; On 2014/08/26 21:48:09, jun_fang wrote: > if ...
6 years, 3 months ago (2014-08-26 22:01:17 UTC) #8
jun_fang
https://codereview.chromium.org/489703004/diff/60001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/489703004/diff/60001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode13 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:13: const size_t ExpectedJP2HeaderSize = sizeof(ExpectedJP2Header) - 1; are you ...
6 years, 3 months ago (2014-08-26 22:09:15 UTC) #9
Tom Sepez
On 2014/08/26 22:01:17, jun_fang wrote: > https://codereview.chromium.org/489703004/diff/1/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp > File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): > > https://codereview.chromium.org/489703004/diff/1/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode584 > ...
6 years, 3 months ago (2014-08-26 22:10:39 UTC) #10
jun_fang
https://codereview.chromium.org/489703004/diff/80001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/489703004/diff/80001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode587 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:587: if (!src_data || src_size < sizeof(szJP2Header)) { it should ...
6 years, 3 months ago (2014-08-26 22:15:03 UTC) #11
jun_fang
https://codereview.chromium.org/489703004/diff/100001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/489703004/diff/100001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode12 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:12: const unsigned char szJP2Header[] = { 0x00, 0x00, 0x00, ...
6 years, 3 months ago (2014-08-26 22:18:43 UTC) #12
Tom Sepez
On 2014/08/26 22:18:43, jun_fang wrote: > https://codereview.chromium.org/489703004/diff/100001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp > File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): > > https://codereview.chromium.org/489703004/diff/100001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode12 > ...
6 years, 3 months ago (2014-08-26 22:21:40 UTC) #13
jun_fang
On 2014/08/26 22:21:40, Tom Sepez wrote: > On 2014/08/26 22:18:43, jun_fang wrote: > > > ...
6 years, 3 months ago (2014-08-26 22:39:50 UTC) #14
Tom Sepez
6 years, 3 months ago (2014-08-26 23:35:16 UTC) #15
Message was sent while issue was closed.
Committed patchset #7 manually as 96f8786 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698