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

Issue 2347603002: Use safe math when rendering line segments in AGG. (Closed)

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

Description

Use safe math when rendering line segments in AGG. It is possible for the calculations in outline_aa::render_line to overflow as the |p| variable is calculated. This Cl updates the routine to use checked math when calculating the value of |p|. BUG=chromium:647026 Committed: https://pdfium.googlesource.com/pdfium/+/4935e606c632e38af8fca1729f8688fa0d152b90

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add patch file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -14 lines) Patch
A third_party/agg23/0003-ubsan-render-line-error.patch View 1 1 chunk +73 lines, -0 lines 0 comments Download
M third_party/agg23/README.pdfium View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/agg23/agg_rasterizer_scanline_aa.cpp View 4 chunks +24 lines, -14 lines 0 comments Download

Messages

Total messages: 15 (8 generated)
dsinclair
PTAL.
4 years, 3 months ago (2016-09-15 13:58:59 UTC) #4
Tom Sepez
https://codereview.chromium.org/2347603002/diff/1/third_party/agg23/agg_rasterizer_scanline_aa.cpp File third_party/agg23/agg_rasterizer_scanline_aa.cpp (right): https://codereview.chromium.org/2347603002/diff/1/third_party/agg23/agg_rasterizer_scanline_aa.cpp#newcode51 third_party/agg23/agg_rasterizer_scanline_aa.cpp:51: #include "third_party/base/numerics/safe_math.h" Is this the first time we've introduced ...
4 years, 3 months ago (2016-09-15 16:50:41 UTC) #7
dsinclair
On 2016/09/15 16:50:41, Tom Sepez wrote: > https://codereview.chromium.org/2347603002/diff/1/third_party/agg23/agg_rasterizer_scanline_aa.cpp > File third_party/agg23/agg_rasterizer_scanline_aa.cpp (right): > > https://codereview.chromium.org/2347603002/diff/1/third_party/agg23/agg_rasterizer_scanline_aa.cpp#newcode51 ...
4 years, 3 months ago (2016-09-15 17:40:45 UTC) #8
Tom Sepez
On 2016/09/15 17:40:45, dsinclair wrote: > On 2016/09/15 16:50:41, Tom Sepez wrote: > > > ...
4 years, 3 months ago (2016-09-15 17:42:37 UTC) #9
Tom Sepez
LGTM otherwise.
4 years, 3 months ago (2016-09-15 17:42:50 UTC) #10
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/2347603002/20001
4 years, 3 months ago (2016-09-15 17:49:34 UTC) #13
commit-bot: I haz the power
4 years, 3 months ago (2016-09-15 19:21:42 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://pdfium.googlesource.com/pdfium/+/4935e606c632e38af8fca1729f8688fa0d15...

Powered by Google App Engine
This is Rietveld 408576698