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

Issue 2231243002: Use CheckedNumeric when converting SkIRect to gfx::Rect. (Closed)

Created:
4 years, 4 months ago by jbroman
Modified:
4 years, 4 months ago
Reviewers:
danakj
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use CheckedNumeric when converting SkIRect to gfx::Rect. BUG=634134 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/a1704b2b984c977e47116e978db7465beaa8a65d Cr-Commit-Position: refs/heads/master@{#413769}

Patch Set 1 #

Patch Set 2 : format #

Total comments: 1

Patch Set 3 : Make SkIRectToRect clamp #

Total comments: 3

Patch Set 4 : handle the negative case; add more comments and unit tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -1 line) Patch
M cc/output/filter_operations_unittest.cc View 1 2 chunks +19 lines, -0 lines 0 comments Download
M ui/gfx/skia_util.cc View 1 2 3 2 chunks +14 lines, -1 line 0 comments Download
M ui/gfx/skrect_conversion_unittest.cc View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (19 generated)
jbroman
I don't really like this fix, but I also don't really have any better ideas ...
4 years, 4 months ago (2016-08-10 22:17:00 UTC) #7
danakj
I think the bug is that we created a FilterOperation with such a large rect. ...
4 years, 4 months ago (2016-08-11 17:51:20 UTC) #10
jbroman
On 2016/08/11 at 17:51:20, danakj wrote: > I think the bug is that we created ...
4 years, 4 months ago (2016-08-11 18:04:02 UTC) #11
danakj
https://codereview.chromium.org/2231243002/diff/20001/ui/gfx/skia_util.cc File ui/gfx/skia_util.cc (right): https://codereview.chromium.org/2231243002/diff/20001/ui/gfx/skia_util.cc#newcode63 ui/gfx/skia_util.cc:63: Rect SkIRectToRectChecked(const SkIRect& rect) { OK I think I'd ...
4 years, 4 months ago (2016-08-11 18:13:38 UTC) #12
danakj
I'm super unhappy at whackamole with security problems, we need to solve this at some ...
4 years, 4 months ago (2016-08-11 20:36:15 UTC) #13
enne (OOO)
On 2016/08/11 at 20:36:15, danakj wrote: > Proposal: gfx::Rect just always clamps the width so ...
4 years, 4 months ago (2016-08-12 22:41:50 UTC) #14
jbroman
I'm a little confused. This particular bug involves an overflow in SkIRectToRect. Are you saying ...
4 years, 4 months ago (2016-08-22 14:50:35 UTC) #15
danakj
On 2016/08/22 14:50:35, jbroman wrote: > I'm a little confused. This particular bug involves an ...
4 years, 4 months ago (2016-08-22 17:47:21 UTC) #16
jbroman
Made SkIRectToRect do that sort of clamping.
4 years, 4 months ago (2016-08-22 19:38:49 UTC) #20
danakj
On 2016/08/22 19:38:49, jbroman wrote: > Made SkIRectToRect do that sort of clamping. Can it ...
4 years, 4 months ago (2016-08-22 19:48:04 UTC) #21
jbroman
On 2016/08/22 at 19:48:04, danakj wrote: > On 2016/08/22 19:38:49, jbroman wrote: > > Made ...
4 years, 4 months ago (2016-08-22 19:52:18 UTC) #22
danakj
https://codereview.chromium.org/2231243002/diff/40001/ui/gfx/skia_util.cc File ui/gfx/skia_util.cc (right): https://codereview.chromium.org/2231243002/diff/40001/ui/gfx/skia_util.cc#newcode52 ui/gfx/skia_util.cc:52: (base::CheckedNumeric<int>(rect.right()) - rect.left()) I see, ok so checking right-left ...
4 years, 4 months ago (2016-08-22 20:01:49 UTC) #23
jbroman
https://codereview.chromium.org/2231243002/diff/40001/ui/gfx/skia_util.cc File ui/gfx/skia_util.cc (right): https://codereview.chromium.org/2231243002/diff/40001/ui/gfx/skia_util.cc#newcode53 ui/gfx/skia_util.cc:53: .ValueOrDefault(std::numeric_limits<int>::max()), On 2016/08/22 at 20:01:49, danakj wrote: > But ...
4 years, 4 months ago (2016-08-23 03:26:58 UTC) #28
danakj
LGTM
4 years, 4 months ago (2016-08-23 17:11:09 UTC) #31
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/2231243002/60001
4 years, 4 months ago (2016-08-23 17:17:14 UTC) #33
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-23 17:22:20 UTC) #34
commit-bot: I haz the power
4 years, 4 months ago (2016-08-23 17:24:14 UTC) #36
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a1704b2b984c977e47116e978db7465beaa8a65d
Cr-Commit-Position: refs/heads/master@{#413769}

Powered by Google App Engine
This is Rietveld 408576698