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

Issue 419063002: Fix the potential integer overflow from 'offset+size' in extension.h and fpdfview.cpp (Closed)

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

Description

Fix the potential integer overflow from 'offset+size' in extension.h and fpdfview.cpp BUG=397258 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/8dee6ca

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 6

Patch Set 7 : #

Patch Set 8 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -24 lines) Patch
M core/include/fxcrt/fx_stream.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M core/include/fxcrt/fx_system.h View 1 2 3 1 chunk +4 lines, -0 lines 1 comment Download
M core/src/fxcrt/extension.h View 1 2 3 4 5 6 7 8 chunks +30 lines, -16 lines 0 comments Download
M fpdfsdk/src/fpdfview.cpp View 1 2 3 4 5 6 3 chunks +24 lines, -8 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jun_fang
Hi Chris, please start to review it. Thanks!
6 years, 5 months ago (2014-07-24 22:07:31 UTC) #1
palmer
Tom, can I defer to you to see this one through to completion? I am ...
6 years, 5 months ago (2014-07-25 00:40:14 UTC) #2
jun_fang
https://codereview.chromium.org/419063002/diff/40001/core/src/fxcrt/extension.h File core/src/fxcrt/extension.h (right): https://codereview.chromium.org/419063002/diff/40001/core/src/fxcrt/extension.h#newcode71 core/src/fxcrt/extension.h:71: base::CheckedNumeric<FX_FILESIZE> pos = size; On 2014/07/25 00:40:14, Chromium Palmer ...
6 years, 5 months ago (2014-07-25 01:04:00 UTC) #3
palmer
> > I think it might be better to declare > > > > base::CheckedNumeric<FX_FILESIZE> ...
6 years, 5 months ago (2014-07-25 18:26:55 UTC) #4
jun_fang
6 years, 5 months ago (2014-07-26 01:26:14 UTC) #5
jun_fang
Hi Tom, can you review the last change? Thanks!
6 years, 4 months ago (2014-07-29 16:59:28 UTC) #6
Tom Sepez
This is looking really good. LGTM with nits. https://codereview.chromium.org/419063002/diff/100001/core/src/fxcrt/extension.h File core/src/fxcrt/extension.h (right): https://codereview.chromium.org/419063002/diff/100001/core/src/fxcrt/extension.h#newcode69 core/src/fxcrt/extension.h:69: FX_SAFE_FILESIZE ...
6 years, 4 months ago (2014-07-30 18:50:25 UTC) #7
jun_fang
Please review it again. Thanks!
6 years, 4 months ago (2014-07-30 20:26:55 UTC) #8
Tom Sepez
LGTM++.
6 years, 4 months ago (2014-07-30 20:29:27 UTC) #9
jun_fang
Committed patchset #8 manually as r8dee6ca (presubmit successful).
6 years, 4 months ago (2014-07-30 20:46:56 UTC) #10
Tom Sepez
6 years, 4 months ago (2014-07-31 18:46:42 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/419063002/diff/130001/core/include/fxcrt/fx_s...
File core/include/fxcrt/fx_system.h (right):

https://codereview.chromium.org/419063002/diff/130001/core/include/fxcrt/fx_s...
core/include/fxcrt/fx_system.h:282: typedef base::CheckedNumeric<size_t>        
   FX_SAFE_SIZET;
nit: Just to be pedantic, I'd have called this FX_SAFE_SIZE_T, just in case some
clown invents a type called sizet distinct from size_t, and tries to use a
FX_SAFE_SIZET with it ... :).

Powered by Google App Engine
This is Rietveld 408576698