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

Issue 2317283002: Verify pattern start values. (Closed)

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

Description

Verify pattern start values. When calculating the starting x and y for a pattern it is possible to overflow the int value. Use checked math to make sure we don't overflow. BUG=chromium:637984 Committed: https://pdfium.googlesource.com/pdfium/+/b1f5545e34375a5947004ee92cc808b3df9d4a5b

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -2 lines) Patch
M core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp View 1 chunk +13 lines, -2 lines 1 comment Download

Messages

Total messages: 12 (7 generated)
dsinclair
PTAL.
4 years, 3 months ago (2016-09-07 19:27:34 UTC) #4
Tom Sepez
lgtm
4 years, 3 months ago (2016-09-07 20:52:24 UTC) #7
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/2317283002/1
4 years, 3 months ago (2016-09-07 20:53:35 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://pdfium.googlesource.com/pdfium/+/b1f5545e34375a5947004ee92cc808b3df9d4a5b
4 years, 3 months ago (2016-09-07 20:53:54 UTC) #11
Lei Zhang
4 years, 3 months ago (2016-09-07 21:44:32 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/2317283002/diff/1/core/fpdfapi/fpdf_render/fp...
File core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp (right):

https://codereview.chromium.org/2317283002/diff/1/core/fpdfapi/fpdf_render/fp...
core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp:1152: start_x =
safeStartX.ValueOrDefault(0);
Can't these be ValueOrDie() since we know we won't die due to passing the checks
on line 1149?

Powered by Google App Engine
This is Rietveld 408576698